🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #624802

Re: The Peter Principle

#624802
From: Joe Pfeiffer
Date: Sun, 08 Jul 2018 01:16
47 lines
3654 bytes
Charles Richmond <nume...@aquaporin4.com> writes:

> On 7/7/2018 6:16 PM, Joe Pfeiffer wrote:
>> Charles Richmond <nume...@aquaporin4.com> writes:
>>
>>> On 7/6/2018 8:00 PM, Dan Espen wrote:
>>>> Charles Richmond <nume...@aquaporin4.com> writes:
>>>>>>
>>>>> Can an unsuccessful exec() call return???  And where would it return to???
>>>>
>>>> The answer is in the man page:
>>>>
>>>> RETURN VALUES
>>>>     If a function in the exec family returns to the calling process image,
>>>>     an error has occurred; the return value is -1 and errno is set to
>>>>     indicate the error.
>>>>     
>>>
>>> The calling process for exec() must be the child process.  ISTM the
>>> child process must signal the parent process and abort... if exec()
>>> fails.
>>
>> There is no requirement that there even be a child process.  There is no
>> reason a process can't replace its own running image using an exec().
>>
>
> Yes, of course... isn't that what any process hopes to achieve by
> calling exec()???  I assume a process could even re-load its *own*
> image using exec().

You're the one who said the child has to call exec(); I was pointing out
that there's no requirement that there even *be* a child.

>> If it's a normal fork&exec, the child process can just exit() (presumably
>> with an error return code) and the parent will find out about it in any
>> of the ways already available (including, of course, SIGCHLD).
>>
>
> But if tye parent process exits before killing the child... you could
> end up with a "zombie" process.  ISTM that SVR4 Unix had system calls
> that would allow the child to exit (and die) without parental
> approval...

You're talking about an orphan.  A process is a zombie when it has
terminated and its parent has not yet reaped it.  An orphan process is
reparented; init becomes its parent.  I can't think off hand of a call
that would assign a child to some other parent than that.
Technical Details
Message-ID: <1bsh4u4jdt.fsf@pfeifferfamily.net>
Path: mbox-mo1.pugleaf.net!l67-v6ni5482itl.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
References: <pho0pp$s4$1@dont-email.me> <pho33o225k4@news4.newsguy.com> <20180706191634.7cc7ff5ecb60db674ea8c73e@eircom.net> <phogdr12dbc@news3.newsguy.com> <phoi8d$mnh$1@dont-email.me> <php3bq$hpq$1@dont-email.me> <phphlm$3jm$1@dont-email.me> <1bmuv2sklm.fsf@pfeifferfamily.net> <phrnhi$ea6$1@dont-email.me>

Show Full Headers
Complete Article Headers
X-Received: by 2002:a24:468f:: with SMTP id j137-v6mr1488772itb.22.1531012576275;        Sat, 07 Jul 2018 18:16:16 -0700 (PDT)
X-BeenThere: alt.folklore.computers@googlegroups.com
Received: by 2002:a6b:7515:: with SMTP id l21-v6ls1445890ioh.13.gmail; Sat, 07 Jul 2018 18:16:15 -0700 (PDT)
X-Received: by 2002:a6b:19c1:: with SMTP id 184-v6mr4988777ioz.66.1531012575555;        Sat, 07 Jul 2018 18:16:15 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!l67-v6ni5482itl.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Joe Pfeiffer <pfei...@cs.nmsu.edu>
Newsgroups: alt.folklore.computers
Subject: Re: The Peter Principle
Date: Sat, 07 Jul 2018 19:16:14 -0600
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <1bsh4u4jdt.fsf@pfeifferfamily.net>
References: <pho0pp$s4$1@dont-email.me> <pho33o225k4@news4.newsguy.com> <20180706191634.7cc7ff5ecb60db674ea8c73e@eircom.net> <phogdr12dbc@news3.newsguy.com> <phoi8d$mnh$1@dont-email.me> <php3bq$hpq$1@dont-email.me> <phphlm$3jm$1@dont-email.me> <1bmuv2sklm.fsf@pfeifferfamily.net> <phrnhi$ea6$1@dont-email.me>
Mime-Version: 1.0
Injection-Info: reader02.eternal-september.org; posting-host="f849a459139707cd89c585c34f1a7688"; logging-data="16566"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX1+EaHS9TqUwNIfBqG2bjhyl2pmv0tZPsY0="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
Cancel-Lock: sha1:mipMs4Kc32V9cEEFFxTqnvvS3Xk= sha1:pZLhLGrak22kgdRf9uiKm9u5Wu0=
Bytes: 3203
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit