bug-bash
[Top][All Lists]
Advanced

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

Re: fg tcsetpgrp() SIGTTIN/SIGTTOU race


From: Chet Ramey
Subject: Re: fg tcsetpgrp() SIGTTIN/SIGTTOU race
Date: Mon, 24 Jul 2023 12:02:49 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 7/18/23 11:50 PM, Earl Chew wrote:

Interestingly dash/ash does not exhibit this behaviour. Looking at the
implementation since 1994 shows that it issues SIGCONT unconditionally
after TIOCSPGRP:

https://svnweb.freebsd.org/base/head/bin/sh/jobs.c?revision=1556&view=markup#l175

https://svnweb.freebsd.org/base/head/bin/sh/jobs.c?revision=1556&view=markup#l207

The prior art suggested by dash/ash is that bash should send SIGCONT
unconditionally after tcsetpgrp() when moving a program to the
foreground.

Thanks for the report. Let's try it, since sending SIGCONT to a process
should not have any negative side effects.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]