Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3379504
D7009.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7009.diff
View Options
diff --git a/nix/mariadb-up-mac.nix b/nix/mariadb-up-mac.nix
--- a/nix/mariadb-up-mac.nix
+++ b/nix/mariadb-up-mac.nix
@@ -12,11 +12,15 @@
name = "mariadb-init";
text = ''
MARIADB_DIR=''${XDG_DATA_HOME:-$HOME/.local/share}/MariaDB
- # 'exec' allows for us to replace bash process with MariaDB
echo "View MariaDB logs: tail -f $MARIADB_DIR/logs" >&2
echo "Kill MariaDB server: pkill mariadbd" >&2
+ # Explicitly close fd3 to prevent `direnv` from hanging
+ # (https://linear.app/comm/issue/ENG-3254/remove-wait-logic-in-nix-develop)
+ exec 3>&-
+
+ # 'exec' allows for us to replace bash process with MariaDB
exec "${mariadb}/bin/mariadbd" \
--socket "$MARIADB_DIR"/mysql.sock \
--datadir "$MARIADB_DIR" \
diff --git a/nix/redis-up-mac.nix b/nix/redis-up-mac.nix
--- a/nix/redis-up-mac.nix
+++ b/nix/redis-up-mac.nix
@@ -15,7 +15,11 @@
echo "View Redis Logs: tail -f $REDIS_CACHE_DIR/logs" >&2
echo "Kill Redis server: pkill redis" >&2
- # 'exec' allows for us to replace bash process with MariaDB
+ # Explicitly close fd3 to prevent `direnv` from hanging
+ # (https://linear.app/comm/issue/ENG-3254/remove-wait-logic-in-nix-develop)
+ exec 3>&-
+
+ # 'exec' allows for us to replace bash process with Redis
exec ${redis}/bin/redis-server \
&> "$REDIS_CACHE_DIR"/logs
'';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 4:36 PM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594447
Default Alt Text
D7009.diff (1 KB)
Attached To
Mode
D7009: [nix] Ensure that fd 3 is closed before we fork `redis-server` and `mariadbd`
Attached
Detach File
Event Timeline
Log In to Comment