Exit status of zero-length executable?

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

 



I was surprised to discover that:

touch foo
chmod +x foo
./foo
echo $?

outputs
0

on the linux, mac, and bsd systems I've tried; on Linux I tried both
bash and dash.

Is this expected?  I did a quick scan of the standard but didn't see
anything related.

Thanks,
Dan



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux