Catching termination of child process and system() call

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Wed Feb 20 11:55:23 AEST 1991


Geoff, somewhere out there is a novice UNIX programmer---let's call him
Joe---who reads your article, and, following your advice, doesn't rely
on the traditional encoding Chris described. Instead he uses the POSIX
macros in exactly the ``portable'' way you showed. He happens to be
using an Ultrix 4.1 system, so his programs work. Some time later he
distributes his code. Most of the administrators who try to install it
find that it doesn't even compile.

If there is even one person like that in the world, you did an injustice
by posting your article. If Doug Gwyn and I hadn't followed up, poor Joe
would have believed you and thought that POSIX code was portable code.
In your second article you were much more careful to point out a truly
portable method. That's good. Why didn't you do it in the first place?

I'm not saying that you were entirely unjustified in stating that
portable programs shouldn't rely on Chris's advice about the wait bits
(although I don't know anyone who would agree with you). I'm just saying
that such a statement will do more harm than good.

Keep this in mind next time you talk about ``portable'' code.

---Dan



More information about the Comp.unix.programmer mailing list