Public bug reported:

The following construct causes a zombie to hang around:

#!/bin/sh
cd /home/tglase/Misc/vpn.w
(sleep 20; sudo route -n add -host x.x.x.x gw 172.28.0.1) &
exec sudo openvpn --config /home/tglase/Misc/vpn.w/vpn-bn-01.ovpn "$@"

Adding an “exec” before the sudo in the subshell fixes this, so perhaps
the shell could clean this up itself? (Ideas and patches welcome…)

** Affects: mksh
     Importance: Low
         Status: Confirmed

-- 
You received this bug notification because you are a member of mksh
Mailing List, which is subscribed to mksh.
Matching subscriptions: mkshlist-to-mksh-bugmail
https://bugs.launchpad.net/bugs/1790571

Title:
  Zombies left when backgrounded jobs run for longer than until the main
  script execs away

Status in mksh:
  Confirmed

Bug description:
  The following construct causes a zombie to hang around:

  #!/bin/sh
  cd /home/tglase/Misc/vpn.w
  (sleep 20; sudo route -n add -host x.x.x.x gw 172.28.0.1) &
  exec sudo openvpn --config /home/tglase/Misc/vpn.w/vpn-bn-01.ovpn "$@"

  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 manage notifications about this bug go to:
https://bugs.launchpad.net/mksh/+bug/1790571/+subscriptions

Reply via email to