posix: Fix pipe fd leak if redirecting both stdout and stderr
This re-adds the close(source) call which already existed here before
commit caa7b2fcc8. pipe_out already closes the source fd when redirecting
stdout or stderr, it was just missing when redirecting both at once.
The pipe fds must be closed after redirecting to avoid keeping the pipe
open unnecessarily, for example the parent may want to close their end of
the pipe.
posix: Fix exec error reporting with limit_handles
_pipe_sink was assigned after call_on_setup(), after limit_fd_::on_setup(),
but this was too late. It must be assigned earlier so that
executor::get_used_handles() can see it and prevent limit_handles from
closing the internal pipe for passing exec() errors from child to parent.
a26f4fe...
by
zhixingchen <zhixingchen0629@163.com>
FIX: fix the posix terminate function implement.
ff5b383...
by
zhixingchen <zhixingchen0629@163.com>
FIX: fix the problem of sending the wrong signal.
0379ee6...
by
Samuel Venable <email address hidden>
Less dependency on libprocstat and various corrections.
On FreeBSD I would like to remove dependency on libprocstat completely, and replace it with libkvm to be more like the other *BSD platforms in terms of linker dependencies. This pull request is our first move in that direction.