FG
💻 Software

Linux / Perl - What happens when a process is forked?

Fresh7 days ago
Mar 15, 20262372 views
Confidence Score0%
0%

Problem

I've read about fork and from what I understand, the process is cloned but which process? The script itself or the process that launched the script? For example: I'm running rTorrent on my machine and when a torrent completes, I have a script run against it. This script fetches data from the web so…

Error Output

my $pid = fork();
if ($pid) == 0) { blah blah blah; exit 0; }

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Linux / Perl - What happens when a process is forked?

Low Risk

From Advanced Programming in the UNIX Environment by W. Richard Stevens (pg. 188): 8.3 function The only way a new process is created by the Unix kernel is when an existing process calls the function. (This doesn't apply to the special processes tha…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment