Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!ogicse!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: Exit code 252 Message-ID: <18694:Mar2014:23:3591@kramden.acf.nyu.edu> Date: 20 Mar 91 14:23:35 GMT References: <4987@goanna.cs.rmit.oz.au> <6794:Mar1812:09:2391@kramden.acf.nyu.edu> <527@bria> Organization: IR Lines: 17 In article <527@bria> uunet!bria!mike writes: > In an article, kramden.acf.nyu.edu!brnstnd (Dan Bernstein) writes: > >[...] New users seem to notice this most often in Makefiles and > >when a job exits in the background under csh; otherwise the exit code of > >such programs generally isn't used. > Ahem -- I beg your pardon. The exit code of a *majority* of the programs > on UNIX *are* used. Otherwise ``||'', ``&&'', ``$?'' and ``if'' would be > somewhat worthless, now wouldn't they? :-) I said ``such programs,'' those being the programs that don't return a meaningful exit code. Example: echo. Sure, echo is useful in Makefiles, and you might occasionally run it in the background in csh; but I've never seen anyone test its exit code in scripts. If it didn't exit(0), new users would notice that fact in Makefiles or when a job exits in the background, as I said. ---Dan