←back to thread

466 points CoolCold | 2 comments | | HN request time: 0.48s | source
1. crest ◴[] No.40235799[source]
So by design run0 does not do what sudo does. If I understand it correctly it has to stay a child of the daemon it's forked or does Linux provide an API to mangle the poor process table to change that since because according to POSIX the process would not part of the current session, or process group? How does this interact with (or break) shell job control since you can't forward SIGKILL. Does anything prevent the invoked process (which could also have less privileges) from holding on to the passed file descriptors e.g. the one to the callers controlling tty or is it restricted to always go through pipes/sockets/a fresh pseudo-tty?
replies(1): >>40235859 #
2. crest ◴[] No.40235859[source]
Okay further down it explains that it always goes through a fresh pseudo-tty (at least for interactive commands?). That solves the file descriptor passing problem but not the reliable signal handling for job control since there're signals you can't catch and forward.