Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!phigate!ehviea!leo From: leo@ehviea.ine.philips.nl (Leo de Wit) Newsgroups: comp.lang.c Subject: Re: popen() can't tell if cmd fails Summary: pclose() Keywords: popen() Message-ID: <821@ehviea.ine.philips.nl> Date: 2 Jul 90 08:28:38 GMT References: <855@cmsfl> Reply-To: leo@ehviea.UUCP (Leo de Wit) Organization: Philips I&E Eindhoven Lines: 19 In article <855@cmsfl> nigel@cmsfl@labtam.oz (Nigel Harwood) writes: |As a general question, how much use to people make of the popen() |function in programs where failures must be detected ? | |I am working on a program where I would like to use |popen() but can see no way of detecting when the command exits |with a bad status. | |At least not easily anyway. From the popen() manual page: A stream opened by popen should be closed by pclose, which waits for the associated process to terminate and returns the exit status of the command. I guess this says it all ... Leo.