[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 26 Feb 2001 11:08:07 -0500 (EST)
> I don't know what to do, I tried many things, but systematically
> failed :( The idea is that
> if (system ("$m4 $tmp/input.m4 >$tmp/updated"))
> die "$me: cannot update \`$filename'\n";
How about this:
* autoupdate.in: Preserve exit status of the failed command
when dying after system() by dividing $! by 256.
@@ -461,8 +461,8 @@
if (system ("$m4 $tmp/input.m4 >$tmp/updated"))
- # FIXME: This guy is supposed to exit with a proper
- # exit status, but it does not. Help is needed.
+ # Exit status of system() is in the upper byte.
+ $! >>= 8;
die "$me: cannot update \`$filename'\n";
It works just fine for me. The documentation for system() (man perlfunc)
says that the error status is in the upper byte,
I'm sure that unlink and rmdir in &END have nothing to do with the