Hi,
> execlp (fileproc, r1bindex (fileproc, '/'),
> "-link", "-file", file, fold, NULL);
> _exit (-1);
> ...
> fprintf (verbose ? stdout : stderr,
> " errored (0%o)\n", status);
> }
>
> so I guess the trick is to figure out what an octal "177400" as a
> return value for pidwait() would mean.
I'd guess that 0177400, which is 0xff00 is two values. The lower byte,
0x00, is the signal that killed the process; none. The upper byte,
0xff, is the exit value of the process; 255 or -1.
That might be due to the _exit(-1) call following the execlp or it
could be that the execlp succeeded and the fileproc program exited with
-1. With the code written as it is we can't tell.
It isn't sufficient to put an _exit() after a failed exec(). The value
of errno should be output to stderr.
Ralph.