nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 35 lines 1.1 kB view raw
1From e00a5257a6ca5fedbf68b09eee7df3502971a057 Mon Sep 17 00:00:00 2001 2From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io> 3Date: Sat, 24 Apr 2021 10:11:40 +0200 4Subject: [PATCH 1/2] No impure bin sh 5 6default_shell is used to populuate default shell used to execute jobs. 7Unless SHELL is set to a different value this would be /bin/sh. 8Our stdenv provides sh in form of bash anyway. Having this value not 9hard-coded has some advantages: 10 11- It would ensure that on all systems it uses sh from its PATH rather 12 than /bin/sh, which helps as different systems might have different 13 shells there (bash vs. dash) 14- In the past I had issues with LD_PRELOAD with BEAR, where /bin/sh 15 used a different glibc than BEAR which came from my development shell. 16--- 17 src/job.c | 2 +- 18 1 file changed, 1 insertion(+), 1 deletion(-) 19 20diff --git a/src/job.c b/src/job.c 21index ae1f18b..6b4ddb3 100644 22--- a/src/job.c 23+++ b/src/job.c 24@@ -77,7 +77,7 @@ char * vms_strsignal (int status); 25 26 #else 27 28-const char *default_shell = "/bin/sh"; 29+const char *default_shell = "sh"; 30 int batch_mode_shell = 0; 31 32 #endif 33-- 342.31.1 35