Walt Mankowski on 3 Dec 2003 23:43:02 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] calling system from PHP


On Tue, Dec 02, 2003 at 05:11:32PM -0500, Iman Mayes wrote:
> Does anyone know how to interpret the return codes from calling system()
> in PHP? I get 126 while trying to execute a command, but if I remember
> correctly that is not the *real* errno value.

If it works like system(3), the return code looks like this:

BITS  MEANING
0-6   signal which killed your child process
7     did child process core dump?
8-15  exit status of child process

126 still seems odd, though.  It means you got a 0 return code, it
didn't dump code, and the child aborted with signal 126.  However,
126 isn't one of the standard signals.

Strange...

Walt

Attachment: pgpgZRCY8qfl6.pgp
Description: PGP signature