diff options
author | Todd C. Miller <Todd.Miller@sudo.ws> | 2023-05-11 18:20:50 -0600 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@sudo.ws> | 2023-05-11 18:20:50 -0600 |
commit | 7c63b65be3550c6767da1d708e01fea6f9de9cb9 (patch) | |
tree | d625c940871fab16ff442673f91740024874c7b8 /.clang-format | |
parent | cddb91108f493a22170e85a25efcdd64949bf6dd (diff) | |
download | sudo-7c63b65be3550c6767da1d708e01fea6f9de9cb9.tar.gz |
run_command: run editor in foreground if visudo is the foreground process
The command is now always run in its own process group. If visudo
is run in the foreground, the command is run in the foreground too.
Otherwise, run the command in the background. There is a race
between the tcsetpgrp() call in the parent and the execve() in the
child. If we lose the race and the command needs the controlling
terminal, it will be stopped with SIGTTOU or SIGTTIN, which the
waitpid() loop will handle.
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions