Date: Sun, 26 Apr 1998 15:48:30 -0400 From: Geoffrey Robinson <geoffr@globalserve.net> To: questions@FreeBSD.ORG Subject: Return Codes Multiplied by 256 Message-ID: <35438F8E.63B2CCBD@globalserve.net>
next in thread | raw e-mail | index | archive | help
I'm writing a front end CGI to interface with another program I've written. The front end program uses popen() to create a pipe to the first program and gets the return code from pclose(). The program that is piped to uses exit() to return an error code other than 0 if a problem occurs. At first I thought I was getting garbage values returned but then I discovered that all the returned where multiplied by 256. If I divide the value returned by 256 I get one of the return codes I specified in my program but I'm afraid something may be wrong if I'm getting it back as a multiple of 256. Can somebody verify that this is supposed to happen, or not. Thanks. -- Geoffrey Robinson geoffr@globalserve.net Oakville, Ontario, Canada. 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?35438F8E.63B2CCBD>