Deutsch   English   Français   Italiano  
<vh2a5i$27jod$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Richard Harnden <richard.nospam@gmail.invalid>
Newsgroups: comp.unix.programmer
Subject: Re: Why does getppid() still return old parent pid after setsid()?
Date: Wed, 13 Nov 2024 13:38:58 +0000
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <vh2a5i$27jod$1@dont-email.me>
References: <vgl8h1$385vs$1@dont-email.me> <vgn9q2$8mls$1@news.xmission.com>
 <vgsko5$u7pg$1@dont-email.me> <vgtr3i$15srv$2@dont-email.me>
 <vgvgt1$cnri$1@news.xmission.com>
Reply-To: nospam.harnden@invalid.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Nov 2024 14:38:58 +0100 (CET)
Injection-Info: dont-email.me; posting-host="87c6b61cde6c0498c083f38248d2565a";
	logging-data="2346765"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19uZor2PHw3NP8toabLWDUGv5YfKQzDvns="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:nrDJyzM3q4TDVHwXv37J+YKSvY0=
In-Reply-To: <vgvgt1$cnri$1@news.xmission.com>
Content-Language: en-GB
Bytes: 1894

On 12/11/2024 12:15, Kenny McCormack wrote:
> In article <vgtr3i$15srv$2@dont-email.me>,
> Lawrence D'Oliveiro  <ldo@nz.invalid> wrote:
>> On Mon, 11 Nov 2024 10:02:45 -0000 (UTC), Muttley wrote:
>>
>>> can't help thinking they should be a single shot OS call to completely
>>> seperate the child from parent.
>>
>> I guess its not that important.
> 
> It *is* "that important".  And daemon(3) fills the role.
> 
> However, it may be true that it doesn't fully fill it - and maybe that it
> should also do the "double fork".
> 

Should it be: parent fork, child setsid, child fork, grandchild exec
or: parent fork, child fork, grandchild setsid, grandchild exec

?