:: Re: [DNG] vdev status update in dae…
Top Page
Delete this message
Reply to this message
Author: aitor
Date:  
To: dng
Subject: Re: [DNG] vdev status update in daedalus
Hi again,

On 17/7/25 1:00, aitor wrote:
> Also, in my previous email I wrote "if (pid==0)", but pid=0 is the kernel:
>>
>> // Child process
>> } else if (pid > 0) {
>>

Sorry, I said a silly. On success, fork() returns in the parent the PID
of the child process:

pid > 0   --->  parent

and 0 is returned in the child:

pid = 0   --->  child

On failure, -1 is returned in the parent, no child process is created.

pid = -1  ---> error

Cheers,

Aitor.