bug-bash
[Top][All Lists]
Advanced

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

Re: set -m +m -x and the element of chance or is it race conditions?


From: jidanni
Subject: Re: set -m +m -x and the element of chance or is it race conditions?
Date: Mon, 24 Jan 2011 22:46:03 +0800

Thanks Greg, but aren't I acting by the rules?
$ cat l
set +m
sleep 44&
kill $!
$ for i in `seq 33`; do bash -xm l; done

Which gives
+ kill 5256
+ set +m
+ kill 5258
+ set +m
+ kill 5260
l: line 4:  5260 Terminated              sleep 44
+ set +m
+ kill 5262
+ set +m
+ kill 5264
+ set +m
I.e., one out of the 33 cases produced the Terminated message on my one
test run.

Why must
set -m; set +m
cause a race condition?

P.S.,
$ wc -l l
3
So "line 4" is wrong too.



reply via email to

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