sddsplot can leave zombie process.

Moderators: michael_borland, soliday

Post Reply
femanov
Posts: 5
Joined: 02 Dec 2008, 14:19

sddsplot can leave zombie process.

Post by femanov » 07 Jul 2013, 23:23

sddsplot can leave zombie process.
it is possibly wait() for pipe input.
Not a big problem, but should be corrected because process table is'n infinite size.

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: sddsplot can leave zombie process.

Post by soliday » 21 Aug 2013, 12:00

If you are launching sddsplot from a tcl/tk script you can end up with zombie processes. The parent processes (tcl/tk script) launches the sddsplot processes which in turn launches the mpl_motif processes. mpl_motif is the graph window that you see. Normally sddsplot is executed in the background so that the tcl/tk script doesn't hang until the mpl_motif window is destroyed. The command might look like:

exec sddsplot data.sdds -col=x,y &

In this case, you will get a zombie process. sddsplot will have completely exited but it will still be listed in the process tree. Even closing the mpl_motif window will not remove it. The zombie process will be removed once you close the parent tcl/tk script.

There is a workaround for this in tcl/tk that I just learned about. You could run:

exec sddsplot data.sdds -col=x,y &
after 10000 { exec sleep 0 }

This will cause the script to launch another program 10 seconds after sddsplot was launched. Some internal mechanism inside tcl/tk apparently checks on the state of all it's children processes and will purge the zombie sddsplot process.

Post Reply