As it turned out, "if (interrupted) break;" is needed in both loops,

in "collect tasks" loop and in enclosing "collect/process" loop.
Before this patch, "strace cat" + "killall -INT strace" wasn't
making strace stop and exit. This patch restores 4.5.18 behavior
in this regard.
This commit is contained in:
Denys Vlasenko 2009-03-20 13:28:00 +00:00
parent aab52cae4c
commit 1e20921216

View File

@ -2789,6 +2789,8 @@ trace()
* To fix it, we collect *all* waitable tasks, then handle
* them all, then repeat.
*/
if (interrupted)
return 0;
tcbs = collect_stopped_tcbs();
if (!tcbs)
break;