suthan@cs.hw.ac.uk (Manickam Umasuthan) (03/16/91)
Could someone explain to me what it means if a programs exits with exit code 252 ? thanks Umasuthan ------- M.Umasuthan (Janet): suthan@uk.ac.hw.cs Dept. of Comp. Sci., ( UUCP): <EUROPE>!ukc!hwcs!suthan Heriot-Watt University, or : suthan@hwcs.uucp
ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) (03/18/91)
In article <2538@odin.cs.hw.ac.uk>, suthan@cs.hw.ac.uk (Manickam Umasuthan) writes: > Could someone explain to me what it means if a programs exits with > exit code 252 ? It means whatever the author of the program wanted it to mean. If it's a UNIX or MS-DOS program, the program probably did exit(-4), so check the program documentation for -4 as well as 252. -- Seen from an MVS perspective, UNIX and MS-DOS are hard to tell apart.
brnstnd@kramden.acf.nyu.edu (Dan Bernstein) (03/18/91)
In article <4987@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: > In article <2538@odin.cs.hw.ac.uk>, suthan@cs.hw.ac.uk (Manickam Umasuthan) writes: > > Could someone explain to me what it means if a programs exits with > > exit code 252 ? > It means whatever the author of the program wanted it to mean. > If it's a UNIX or MS-DOS program, the program probably did exit(-4), > so check the program documentation for -4 as well as 252. On many UNIX boxes a main() that falls through the end will return a garbage exit code. In systems shipped by careless vendors many programs act this way. 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. ---Dan
brnstnd@kramden.acf.nyu.edu (Dan Bernstein) (03/20/91)
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