On Tue, Oct 23, 2012 at 10:42:47PM +0200, Ed Schouten wrote: > Hi Kostik, > > 2012/10/23 Konstantin Belousov <[email protected]>: > > This is reproducable with the cat(1) as well. The telling part is that > > the backgrounded process stays on the "ttyin" cv. The code for e.g. > > tty read currently is structured as follows: > > check for background process reading from CTTY, send SIGTTYIN > > loop { > > sleep waiting for input > > process input > > } > > The problem is that the SIGCONT does not remove the sleeping process from > > the sleep queue, so the sleep is not interrupted with error. Instead, the > > process is woken up later when input is available. > > > > Old tty code did the recheck for background state inside the loop after > > the sleep. > > Exactly. Was just debugging this as well and came to the same > conclusion. Will try to come up with a decent patch tomorrow evening. > > Thanks for reporting the issue!
No problem folks. Would you like me to file a PR for this so we can track it/for historical purposes? -- | Jeremy Chadwick [email protected] | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB | _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[email protected]"
