Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [fork]

The fork() function is the Unix/Linux/POSIX way of creating a new process by duplicating the calling process.

fork
0 votes
0 answers
14 views

Explain the behavior of parent and child processes

So, recently I have been learning about processes, operating systems, etc. I have come across a problem that I simply can't wrap my head around. Here is the code to the said problem #include <stdio....
sampath sai charan's user avatar
-2 votes
0 answers
41 views

What should be pushed to a new remote when forking manually? [closed]

I need to fork an existing repository to a new remote. What should be pushed to the new repository? $ git remote add relocated http://new... $ git push --all relocated $ git push --tags relocated ...
Jin Kwon's user avatar
  • 21.5k
1 vote
1 answer
44 views

Is there a way to merge a multiple git repository inside another one even if some of us are forked?

I have to change our code base to a monorepo alternative. That's why I have to "merge" many project inside a new project. But we want to keep git history. My problem is this : I have got a ...
CrunchyArtie's user avatar
-2 votes
3 answers
140 views

if(fork()) and if(!fork()) - how do they work?

Let's say we have the following: pid_t pid; pid = fork(); if(pid == 0) { if(fork()) printf("A"); else printf("B"); printf("C"); } else { ...
RhoThanos's user avatar
-1 votes
0 answers
7 views

VS Code codebase fork

I want to fork the vs code codebase in git repository and clone it in my system. After doing so, I am getting dependency errors and npm install does not happen successfully. Can someone guide me with ...
Shilpy Khanna's user avatar
1 vote
0 answers
51 views

execve system call returning an unexpected output

So I've been working on a mini project in C about piping and processes in Linux. A program is executed like this: ./a.out "file1" "cmd1" "cmd2" "file2" It ...
Igor Mićović's user avatar
0 votes
0 answers
17 views

Cygwin shell behavior when running native executable

Since Windows is not a fully compliant POSIX system, there are significant challenges in implementing an efficient emulation of fork on Cygwin. Cygwin still does a decent job of it but the performance ...
mindoverflow's user avatar
1 vote
0 answers
75 views

Forking and piping under windows

use Child qw/child/; my @childs; for my $i (1 .. 65) { push @childs, child { my $parent = shift; $parent->say("[return $i]"); } pipe => 1; } print $_->...
mpapec's user avatar
  • 50.5k
0 votes
1 answer
38 views

How to setup Clion to follow child process, permanently

I do know how to follow child proccess in gdb but, I don't want to setup gdb every time. So is it a way of making the debugger of Clion follow child every time ? I use for now the following commands : ...
Goyo's user avatar
  • 1
0 votes
0 answers
22 views

ALSA underruns and overruns on process fork() call

This is a rather surprising issue. In my application ALSA is handling constant audio streaming between multiple nodes, the whole application is made out of multiple threads, each assigned to a unique ...
Antoni's user avatar
  • 358
1 vote
0 answers
10 views

COW Pages in Fork() System call after child process aborts for generating a core dump

I am trying to generate core dump of a running process by forking the process and aborting the child so that the child will generate a core dump(essentially giving me a dump of the parent's VM), ...
Shivam Garg's user avatar
0 votes
2 answers
219 views

Why parent process is active when not using wait function?

I am using pipes to display file contents. When I comment the wait command (in the last part of the parent process), I expect to see the parent process in the ps command's output (after a while, ...
tahzibi.jafar's user avatar
1 vote
0 answers
49 views

from where the child process will get informations about other variables that are before the fork()?

in my case i have a code where there are mentioned many fork() (8 times) functions so many child processes are going to be created , so let's imagine the every fork() is related to its variable like ...
Mounir Elkatmour's user avatar
0 votes
1 answer
109 views

Clone/Fork a Process in C++ on Windows? [duplicate]

I'm attempting to understand what is the proper way to clone/fork a process in C++ on Windows. All the examples below are compiled & ran using Visual Studio 2022 on a Windows 10 system. It is my ...
Runsva's user avatar
  • 617
2 votes
1 answer
55 views

Do forked child processes die with their parent?

I looked this question up on SO and Google and just about every time someone asks this, it seems the answer is "no" and that you have to go out of your way to ensure the children are ...
Chris_F's user avatar
  • 5,318

15 30 50 per page
1
2 3 4 5
447