bug-bash
[Top][All Lists]
Advanced

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

Re: give_terminal_to() / maybe_give_terminal_to() race


From: Chet Ramey
Subject: Re: give_terminal_to() / maybe_give_terminal_to() race
Date: Fri, 1 Sep 2023 10:07:09 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

On 9/1/23 7:58 AM, Martin D Kealey wrote:

I would have though the obvious fix was to move setting tty pgrp into the child; this would guarantee that it happens before the execve() and before the waitpid() returns.

Not quite; child processes already set the terminal pgrp. The question is
whether or not to have the parent set it as well.

--
``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]