Re: more(1) may attempt to tcsetattr(3) despite lacking controlling terminal

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

 



On 19 October 2016 at 11:09, Karel Zak <kzak@xxxxxxxxxx> wrote:
> On Thu, Oct 13, 2016 at 10:39:32AM -0400, Jan Schaumann wrote:
>> more(1) may attempt to call tsetattr(3) on stderr even if its process is
>> not in a process group with a controlling terminal.  As a result,
>> SIGTTOU will be generated, suspending the process.
>
> Frankly, all the code:
>
>       tcgetattr(fileno(stderr), &otty);
>       savetty0 = otty;
>       slow_tty = cfgetispeed(&otty) < B1200;
>       hardtabs = (otty.c_oflag & TABDLY) != XTABS;
>
> seems strange, it does not care if the tcgetattr() has been successful
> on stderr, etc.
>
>      ls | more 2> /dev/null
>
> behaves differently than without stderr redirection.
>
> All the code is pretty mess (e.g. slow_tty is nowhere used, etc.).
> Sami has tried to cleanup the code, but not sure about status of this
> project (https://github.com/kerolasa/lelux-utiliteetit/commits/more3).

I do not know how to test more(1) automatically, so sending long
pull with zillion changes cannot be accepted.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux