From: john@iastate.edu (John Hascall)
Subject: Re: What exactly does pclose() return?
Date: 1996/01/21 [thread overview]
Message-ID: <4dsjph$1pd@news.iastate.edu> (raw)
In-Reply-To: 4dmnc8$t0u@vertex.tor.hookup.net
Murray S. Kucherawy <mskucher@vertex.tor.hookup.net> 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
<a href="http://www.cc.iastate.edu/staff/systems/john/">My Homepage</a>
prev parent reply other threads:[~1996-01-21 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-18 5:00 What exactly does pclose() return? Murray S. Kucherawy
1996-01-21 5:00 ` John Hascall [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox