On Wed, Jul 17, 2002 at 07:09:41PM +0400, Alexander V. Lukyanov wrote:
> > Try:
> > repeat 0s !echo hi
> > A ^C gets eaten by the child job; you have to mash ^C to stop it.  I'm
> > not sure there's a clean way to fix this.  (Repeat shouldn't stop if its
> > command exits with an error; perhaps it should exit if the command exits
> > because of an interrupt?)
> 
> Try this patch.

Hmm.  This helps, but there seems to be something else going on, too.

"repeat 0s foo" often requires multiple ^Cs to stop.  It seems that
the CmdExec within SleepJob is being run by the scheduler first, not
doing anything with the SIGINT (since it's not interactive), and then
clearing it in exec_parsed_command.  Then the main CmdExec runs, but
the SIGINT is already gone.  Maybe ResetCount should only be done in
exec_parsed_command in the interactive shell?  I'm not sure.

"repeat 0s !echo hello" does the same thing, but tends to require me to
hold down ^C to stop it (for the above, ^C fails about 50% of the time;
here it fails about 95% of the time.)  I don't know if this is the same
problem.

-- 
Glenn Maynard

Reply via email to