On 18 March 2014 08:04, Linda Walsh <b...@tlinx.org> wrote: > > > Chet Ramey wrote: > >> Because the execution fails in a child process. You'd be able to fix it >> for that process, but would do nothing about the contents of the parent >> shell's hash table. >> >> The way the option works now is to check the hash lookups and delete >> anything that is no longer an executable file, then redo the lookup and >> hash the new value. >> > ---- > Wouldn't bash notice that the child exited in <.1 seconds ( > or is it less? >
Timing is not something you could rely on, though. The child could report failure by e.g. writing through a pipe to the parent, as in http://stackoverflow.com/questions/2719499/c-signal-parent-process-from-childthereby letting the parent update its hash table, but it's not clearly worth the extra complexity to remove the small overhead.