Zombies left when backgrounded jobs run for longer than until the main script execs away
Bug #1790571 reported by
Thorsten Glaser
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mksh |
Confirmed
|
Low
|
Unassigned |
Bug Description
The following construct causes a zombie to hang around:
#!/bin/sh
cd /home/tglase/
(sleep 20; sudo route -n add -host x.x.x.x gw 172.28.0.1) &
exec sudo openvpn --config /home/tglase/
Adding an “exec” before the sudo in the subshell fixes this, so perhaps the shell could clean this up itself? (Ideas and patches welcome…)
To post a comment you must log in.