From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9ecfb994a8e47570 X-Google-Attributes: gidfee84,public X-Google-Thread: 1014db,9ecfb994a8e47570 X-Google-Attributes: gid1014db,public From: john@iastate.edu (John Hascall) Subject: Re: What exactly does pclose() return? Date: 1996/01/21 Message-ID: <4dsjph$1pd@news.iastate.edu>#1/1 X-Deja-AN: 136099397 references: <4dmnc8$t0u@vertex.tor.hookup.net> organization: Iowa State University, Ames, Iowa USA newsgroups: comp.lang.c,comp.unix.osf.osf1 Murray S. Kucherawy wrote: }Does pclose() simply return the status of the child, or does it return one }of those "wait" values where the status is really in the second byte of }the return value? What's it *supposed* to do? } }For example, let's say I expect the exit status of a program to be }67 (like sendmail when it gets "no such user"). Should pclose() }return 67, or 256*67? } }The man page on OSF/1 doesn't say either way, but the weak wording suggests }the former, and I'm getting the latter. If I write my code to presume }the latter, how portable is it going to be? Every pclose() I've seen just gives you back what it gets back from whichever member of the wait() family it calls. I don't recall if this is mandated by XOPEN or not. John -- John Hascall ``An ill-chosen word is the fool's messenger.'' Moderator, comp.unix.wizards Systems Software Engineer, ISU Comp Center + Ames, IA 50011 + 515/294-9551 My Homepage