0

I have a c compiled code.
I am using

exec('./a.out 2>&1',$out,$ret);
in my php script to get return type where I want to know first whether it ran fine or what went wrong a segmentation fault or infinite loop or something like that.
basically i want to know the exit status 0,1 and 2 and there significance.
if any other exit status exist please tell those also..

1 Answers1

0

PHP puts the exit status of the exec()ed program to the $ret variable. The program has exited successfully iff $ret becomes 0 after exec() returns.

pts
  • 80,836
  • 20
  • 110
  • 183