The comment was added in e2ab6b7f3567542a2a1b5aab053d513737e72878, but posix_spawn usage was removed in 5309497727debfe1b268f915c5a41bdbe93ad9de to ensure CLOEXEC correctness.
Unified · Split
| @@ -436,9 +436,6 @@ static int load_run(struct mp_script_args *args) · 435 unmodified lines | ||
| 436 | 436 | mp_subprocess(args->log, &opts, &res); |
| 437 | 437 | |
| 438 | 438 | // Closing these will (probably) make the client exit, if it really died. |
| 439 | − // They _should_ be CLOEXEC, but are not, because | |
| 440 | − // posix_spawn_file_actions_adddup2() may not clear the CLOEXEC flag | |
| 441 | − // properly if by coincidence fd==src_fd. | |
| 442 | 439 | close(fds[0]); |
| 443 | 440 | if (fds[1] >= 0) |
| 444 | 441 | close(fds[1]); |