Date: Thu, 25 Oct 2012 09:45:11 +0200 From: Ed Schouten <ed@80386.nl> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Jeremy Chadwick <jdc@koitsu.org>, freebsd-stable@freebsd.org, jhb@freebsd.org Subject: Re: pty/tty or signal strangeness, or grep/bsdgrep bug? Message-ID: <CAJOYFBBHALFeBciSdJECPp6ad0=MyiuSxpDSDU8oWrVxTMuF9Q@mail.gmail.com> In-Reply-To: <CAJOYFBDhDMwgPyWRrzj021eqN=meS3q2FfTi9=5xpVPcXrNxYg@mail.gmail.com> References: <20121023142703.GA79098@icarus.home.lan> <20121023203928.GZ35915@deviant.kiev.zoral.com.ua> <CAJOYFBDhDMwgPyWRrzj021eqN=meS3q2FfTi9=5xpVPcXrNxYg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi all, 2012/10/23 Ed Schouten <ed@80386.nl>: > Will try to come up with a decent patch tomorrow evening. Ahem; the day after tomorrow. Jeremy, could you please try the following patch? http://80386.nl/pub/tty-bg-read.txt I decomposed the TTY read routine into four separate functions to improve clarity. While this was initially true, I think it's a pity the four functions are constantly becoming a bit more complex. The same issue is also present on the output path, but I have no idea how realistic/hard it is to fix this issue. Also, it might not really be an issue in practice. If you do a large write and become a non-foreground process group, you might be able to circumvent TOSTOP while the write() is in transit. Fixing this might be tedious, because we currently enforce that writes to a TTY are serialized. Blocking inside the write() might then cause a deadlock. But in my opinion, I would prefer the serialization over the enforcing of TOSTOP. Thanks again for reporting the issue! -- Ed Schouten <ed@80386.nl>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJOYFBBHALFeBciSdJECPp6ad0=MyiuSxpDSDU8oWrVxTMuF9Q>