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 c...@case.edu http://tiswww.cwru.edu/~chet/