Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jul 1999 07:06:49 -0400 (EDT)
From:      Thomas David Rivers <rivers@dignus.com>
To:        mi@kot.ne.mediaone.net, questions@FreeBSD.ORG
Subject:   Re: result of pclose
Message-ID:  <199907141106.HAA32400@lakes.dignus.com>
In-Reply-To: <199907140430.AAA30964@kot.ne.mediaone.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> According to pclose(3), its result must be the exit code of the process.
> Is this a bug, or do I misunderstand the manual? Thanks!
> 
> 	-mi
> 

 That is the exit code of the process.

 The exit code returns is in a format called the `status area',
 and is exactly the same as that returned by the wait(2)
 system call.

 The wait(2) man page describes the macros you need to use to
 get the return code of the process.

 What you want to do is something like:

    rc = WEXITSTATUS(pclose(pipe));

 	- Dave Rivers -
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907141106.HAA32400>