File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
pkgs/os-specific/bsd/openbsd/pkgs/rc Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1+ When /bin/sh is bash, this code doesn't work right - bash has a "tail call"
2+ optimization where the last command in a finite script will be run as if with
3+ exec instead of forking a new shell. rc here expects `pkill -P $$` (kill all
4+ processes with parent pid == shell) to effectively background a process, but
5+ instead it kills it!
6+
7+ diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr
8+ index 1f872f0ebc8..0c32b00e2ef 100644
9+ --- a/etc/rc.d/rc.subr
10+ +++ b/etc/rc.d/rc.subr
11+ @@ -178,7 +178,7 @@ rc_exec() {
12+ ${daemon_execdir:+cd ${daemon_execdir} && } \
13+ $@ \
14+ ${daemon_logger:+ 2>&1 |
15+ - logger -isp ${daemon_logger} -t ${_name}}"
16+ + logger -isp ${daemon_logger} -t ${_name}}; exit"
17+ }
18+
19+ rc_start() {
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ mkDerivation {
55 pname = "rc" ;
66 path = "etc" ;
77
8- patches = [ ./boot-phases.patch ] ;
8+ patches = [
9+ ./boot-phases.patch
10+ ./binsh-is-bash.patch
11+ ] ;
912
1013 buildPhase = ":" ;
1114
You can’t perform that action at this time.
0 commit comments