Article View: alt.folklore.computers
Article #624803Re: The Peter Principle
From: Charles Richmond
Date: Mon, 09 Jul 2018 03:28
Date: Mon, 09 Jul 2018 03:28
62 lines
4429 bytes
4429 bytes
On 7/7/2018 8:16 PM, Joe Pfeiffer wrote: > 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. > > In the first edition of _Advanced Programming in the UNIX Environment-, by W. Richard Stevens (RIP)... pages 280-281: "If a process specifically sets its disposition to SIG_IGN, children of the calling process will *not* generate zombie processes. ... Instead, on termination, the status of these child processes is just discarded." In the above case, the parent does *not* have to "reap" the child process. -- numerist at aquaporin4 dot com
Technical Details
Message-ID:
<phukp9$le7$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!z3-v6ni6128iti.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mailReferences:
<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> <1bsh4u4jdt.fsf@pfeifferfamily.net>Show Full Headers
Complete Article Headers
X-Received: by 2002:a24:730a:: with SMTP id y10-v6mr7847658itb.33.1531106922303; Sun, 08 Jul 2018 20:28:42 -0700 (PDT) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 2002:a6b:7016:: with SMTP id l22-v6ls1690787ioc.17.gmail; Sun, 08 Jul 2018 20:28:41 -0700 (PDT) X-Received: by 2002:a6b:ef12:: with SMTP id k18-v6mr8514674ioh.31.1531106921684; Sun, 08 Jul 2018 20:28:41 -0700 (PDT) Path: mbox-mo1.pugleaf.net!z3-v6ni6128iti.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Charles Richmond <nume...@aquaporin4.com> Newsgroups: alt.folklore.computers Subject: Re: The Peter Principle Date: Sun, 8 Jul 2018 22:28:40 -0500 Organization: A noiseless patient Spider Lines: 62 Message-ID: <phukp9$le7$1@dont-email.me> 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> <1bsh4u4jdt.fsf@pfeifferfamily.net> Reply-To: nume...@aquaporin4.com Mime-Version: 1.0 Injection-Date: Mon, 9 Jul 2018 03:28:41 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="f02fb5d81399ebfa8ab8155beb80dce8"; logging-data="21959"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX18wvZAycr1YvGO8ykESwuFFFrr+z9tyU/w=" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 Cancel-Lock: sha1:acyK3/hXSh/G5WUliHXElPYVvGA= In-Reply-To: <1bsh4u4jdt.fsf@pfeifferfamily.net> Bytes: 4083 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit