bug-bash
[Top][All Lists]
Advanced

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

Exit status 0 when the file is moved out from under a script


From: Rob Ewaschuk
Subject: Exit status 0 when the file is moved out from under a script
Date: Fri, 30 Dec 2005 20:40:33 +0000

I'm running:

GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
Kernel 2.4.22 on i686


When running a bash script from NFS, and a stale NFS file handle is
generated (in my case from saving over the script while it's running,
which is indeed a bad habit), the script dies with exit status zero. 
This should exit with a non-zero status, since it is an error
condition.


Here's the last bit of an strace from a script doing just that:
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
read(255, 0x80ef008, 8176)              = -1 ESTALE (Stale NFS file handle)
exit_group(0)                           = ?

-Rob

--
_________________________________________________
Rob Ewaschuk      http://rob.infinitepigeons.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]