| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| |
|
|
|
|
|
|
| |
Allow the caller to pass the same FD (for example, a single /dev/null
FD) to spawn().
All we need to do to handle this correctly is ensure we don’t try to
close the same FD multiple times.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
slave: no need to restore signal handlers; they are automatically
restored as long as they are not SIG_IGN (which they never are in
foot).
spawn(): restore signal mask after fork. This fixes an issue where a
terminal spawned with ctrl+shift+n did not terminate when its shell
exited.
Closes #366
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Note: this uses the __sanitizer_print_stack_trace() function from the
AddressSanitizer runtime, so it only works when AddressSanitizer is
in use.
|
| |
|
|
|
|
|
|
|
| |
When calling ‘reaper_add()’, the caller can provide a callback. If
non-NULL, the reaper will call the callback to handle the actual
reaping.
If the callback is NULL, or if it returns false, the reaper reaps the
child process.
|
| |
|
|
|
| |
This ensures all calls have at least one __VA_ARGS__ argument, thus
making them ISO C99 compliant.
|
| |
|
|
|
| |
If not -1, spawn() will redirect the child's stdin/stdout/stderr to
these FDs.
|
| |
|