Article View: alt.folklore.computers
Article #624793Re: The Peter Principle
From: Charles Richmond
Date: Sat, 07 Jul 2018 06:45
Date: Sat, 07 Jul 2018 06:45
66 lines
4493 bytes
4493 bytes
On 7/7/2018 1:24 AM, Ahem A Rivet's Shot wrote: > On Sat, 7 Jul 2018 00:05:12 -0500 > Charles Richmond <nume...@aquaporin4.com> wrote: > >> On 7/6/2018 8:00 PM, Dan Espen wrote: >>> Charles Richmond <nume...@aquaporin4.com> writes: >>> >>>> On 7/6/2018 2:37 PM, Charlie Gibbs wrote: >>>>> On 2018-07-06, Ahem A Rivet's Shot <ste...@eircom.net> wrote: >>>>> >>>>>> On 6 Jul 2018 15:50:16 GMT >>>>>> Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote: >>>>>> >>>>>>> On 2018-07-06, Gareth's Downstairs Computer >>>>>>> <headstone255.but.n...@yahoo.com> wrote: >>>>>>> >>>>>>>> Do incompetent computer programmers become technical authors? >>>>>>> >>>>>>> Nah, they go straight into management. >>>>>> >>>>>> Yep, the sad thing is when it happens to competent >>>>>> programmers. >>>>> >>>>> Which brings to mind that old Unix joke: >>>>> >>>>> A programmer went into management and turned out to be quite good at >>>>> it. One of his old buddies, remembering how much fun he had as a >>>>> programmer, asked him whether he ever considered moving back. "No," >>>>> the manager said. "As you know, there is no return for a successful >>>>> exec()." >>>>> >>>> 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 are no parent and child processes with exec(), it's all one > process. Calling exec() replaces the code in the *current* process with new > code, if it succeeds it cannot return because the return point no longer > exists. One obvious failure mode that leaves the original code intact is > being unable to read the file containing the new code in which case a > return is trivially possible and expected. > > If you want a child you have to fork(). > Yes, yes, of course... the parent and child processes are the result of the fork() call. From this pair of processes, the child will be the one to call exec() and over-write the executable with a new binary image. Therefore, if that exec fails, it will return to that child process. Certainly the exec() call has *no* sense of child or parent, and needs none. But when fork() creates the parent-child pair of processes, the child will be the one that will then call exec(). -- numerist at aquaporin4 dot com
Technical Details
Message-ID:
<phpnhi$vep$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!d26-v6ni18368wmb.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!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> <20180707072422.f1f40a1cb5d9a8d9a886abdb@eircom.net>Show Full Headers
Complete Article Headers
X-Received: by 2002:adf:f211:: with SMTP id p17-v6mr1023845wro.17.1530945906926; Fri, 06 Jul 2018 23:45:06 -0700 (PDT) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 2002:a1c:308c:: with SMTP id w134-v6ls1815916wmw.11.gmail; Fri, 06 Jul 2018 23:45:06 -0700 (PDT) X-Received: by 2002:a1c:960d:: with SMTP id y13-v6mr1120886wmd.32.1530945906406; Fri, 06 Jul 2018 23:45:06 -0700 (PDT) Path: mbox-mo1.pugleaf.net!d26-v6ni18368wmb.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!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: Sat, 7 Jul 2018 01:45:22 -0500 Organization: A noiseless patient Spider Lines: 66 Message-ID: <phpnhi$vep$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> <20180707072422.f1f40a1cb5d9a8d9a886abdb@eircom.net> Reply-To: nume...@aquaporin4.com Mime-Version: 1.0 Injection-Date: Sat, 7 Jul 2018 06:45:06 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="1829505eb25041b2d590a029e8374348"; logging-data="32217"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX1+WMjT2Md212YHJu8aPVyDMa91XDMCrmb4=" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 Cancel-Lock: sha1:BnitYQ6sr3imw1qpeJVG3Bj/svg= In-Reply-To: <20180707072422.f1f40a1cb5d9a8d9a886abdb@eircom.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit