[nix] Ensure that fd 3 is closed before we fork redis-server and mariadbd
Summary:
It looks like fd 3 needs to be closed IN ADDITION to STDIN/STDOUT/STDERR for direnv to return control to the user.
By closing fd 3 after we fork but before we exec redis-server and mariadbd, we can ensure that they don't cause direnv to hang.
Kind of annoying, but direnv is not designed to handle launching of daemons.. and we're doing some custom stuff instead of launchd.
Test Plan: I can use direnv seamlessly without any issue.
Reviewers: ashoat, tomek, jon, O1 Nix
Reviewed By: jon, O1 Nix
Differential Revision: https://phab.comm.dev/D7009