Re: Why does getppid() still return old parent pid after setsid()?

Liste des GroupesRevenir à cu programmer 
Sujet : Re: Why does getppid() still return old parent pid after setsid()?
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.programmer
Date : 11. Nov 2024, 21:15:05
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vgtok9$br6j$1@news.xmission.com>
References : 1 2 3
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <vgtdm4$11fog$2@dont-email.me>,
Lew Pitcher  <lew.pitcher@digitalfreehold.ca> wrote:
...
Kenny, could you elaborate on the use of prctl() to "reparent" a process?
I've not seen examples of how to do this, and the prctl(2) manpage doesn't
explicitly indicate the options necessary.
>
I don't see any option that controls or modifies a process PPID. The only
prctl(2) options that I can see relating to "reparenting" are the
PR_SET_CHILD_SUBREAPER and PR_GET_CHILD_SUBREAPER options that
seem to govern who gets SIGCHLD on the child's death. Is this what you
mean by "reparenting"?

Yes, that's it.  The man page text even includes the word 'reparented'.

Note;  I've never actually used this call, but I can imagine situations
where it could be used.  The man page seems pretty clear as to what it does.

--
    The difference between communism and capitalism?
    In capitalism, man exploits man. In communism, it's the other way around.

- Daniel Bell, The End of Ideology (1960) -

Date Sujet#  Auteur
8 Nov 24 * Why does getppid() still return old parent pid after setsid()?20Muttley
8 Nov 24 +* Re: Why does getppid() still return old parent pid after setsid()?2Lew Pitcher
9 Nov 24 i`- Re: Why does getppid() still return old parent pid after setsid()?1Lawrence D'Oliveiro
9 Nov 24 +* Re: Why does getppid() still return old parent pid after setsid()?12Kenny McCormack
9 Nov 24 i+* Re: Why does getppid() still return old parent pid after setsid()?2Lew Pitcher
9 Nov 24 ii`- Re: Why does getppid() still return old parent pid after setsid()?1Lew Pitcher
11 Nov 24 i+* Re: Why does getppid() still return old parent pid after setsid()?7Muttley
11 Nov 24 ii+- Re: Why does getppid() still return old parent pid after setsid()?1Lew Pitcher
11 Nov 24 ii`* Re: Why does getppid() still return old parent pid after setsid()?5Lawrence D'Oliveiro
12 Nov 24 ii `* Re: Why does getppid() still return old parent pid after setsid()?4Kenny McCormack
13 Nov 24 ii  `* Re: Why does getppid() still return old parent pid after setsid()?3Richard Harnden
13 Nov 24 ii   `* Re: Why does getppid() still return old parent pid after setsid()?2Lew Pitcher
13 Nov 24 ii    `- Re: Why does getppid() still return old parent pid after setsid()?1Richard Harnden
11 Nov 24 i`* Re: Why does getppid() still return old parent pid after setsid()?2Lew Pitcher
11 Nov 24 i `- Re: Why does getppid() still return old parent pid after setsid()?1Kenny McCormack
11 Nov 24 +- Re: Why does getppid() still return old parent pid after setsid()?1Rainer Weikusat
12 Nov 24 +* Re: Why does getppid() still return old parent pid after setsid()?2Geoff Clare
12 Nov 24 i`- Re: Why does getppid() still return old parent pid after setsid()?1Muttley
12 Nov 24 `* Re: Why does getppid() still return old parent pid after setsid()?2Kaz Kylheku
13 Nov 24  `- Re: Why does getppid() still return old parent pid after setsid()?1Muttley

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal