HomePhabricator
Diffusion Comm a245d2e2f38f

[nix] Ensure that fd 3 is closed before we fork `redis-server` and `mariadbd`

Description

[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

Details

Provenance
atulAuthored on Mar 8 2023, 10:41 AM
Reviewer
Restricted Owners Package
Differential Revision
D7009: [nix] Ensure that fd 3 is closed before we fork `redis-server` and `mariadbd`
Parents
rCOMM94d3449b1bb0: Run everuthing regarding NotificationsCryptoModule with native Android…
Branches
Unknown
Tags
Unknown