Please sign in to comment.
It's safer to close stdin/out/err by replacing their fd with /dev/null.
Otherwise the next opened fds are 0/1/2, and any code writing to stdout/stderr might break things by writing to an unintentional fd. Signed-off-by: Timo Sirainen <firstname.lastname@example.org>
- Loading branch information...