Bugzilla – Bug 150259
CTRL-Z in bash causes next command in && expression to proceed
Last modified: 2006-02-13 15:30:33 UTC
In bash, run a command like "command1 && command2". Then press CTRL-Z while command1 is running. command1 will pause as it's supposed to, but then also command2 will start, even though command1 is not finished yet and has not yet returned any exit value! Here's a simple reproduction of the problem. In the below script, I hit CTRL-Z a couple of seconds after the first command was entered. Note the "foo" output was printed before the full 5 seconds was up: $ sleep 5 && echo foo [1]+ Stopped sleep 5 foo $ fg sleep 5 $ uname -a Linux lisa 2.6.13-15.7-default #1 Tue Nov 29 14:32:29 UTC 2005 i686 i686 i386 GNU/Linux [archie@lisa] 1168 bash --version GNU bash, version 3.00.16(1)-release (i586-suse-linux) Copyright (C) 2004 Free Software Foundation, Inc.
Q: Why is this major? Beside this the new bash 3.1.5 used for the next release of SuSE Linux seems to be correct.
Not sure if this question is directed at me, but here goes.. I marked it major because to me it seems like a major bug. But hey, I'm just just the guy reporting the problem, not the guy fixing it, so change to whatever priority you like. In any case, if this bug is already fixed in a later version of SuSE (something I have no way of knowing since I'm using SuSE 10.0 at the moment) then I guess we're all done and you can resolve the bug. Thanks.
fixed in next release