Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

4.4.3 Win32 zombie wgnuplot.exe processes

1,383 views
Skip to first unread message

Dougster

unread,
Oct 28, 2011, 6:51:06 PM10/28/11
to
It seems that wgnuplot.exe on XP win32 is leaving zombie processes
behind

When I run

"c:\Program Files\gnuplot\binary\wgnuplot.exe" "-p" "-e" "plot sin(x)"

Close the graph window (since that's the only window because of the -
p)

Take a look in Windows Task Manager and the process remains long after
the window has been closed.

If anyone else has this problem, my current work around is to issue
the following command some time later at the command prompt and force-
ably kill all the tasks called wgnuplot.exe. [but apparently, the
"taskkill" command isn't in all versions of windows - sorry]

taskkill /F /IM wgnuplot.exe

Dougster

unread,
Dec 3, 2011, 7:46:48 PM12/3/11
to

Anyone come across a proper solution to this? Is it a bug? Or am I
being stupid?

sisyphus

unread,
Dec 10, 2011, 8:26:23 PM12/10/11
to
On Dec 4, 11:46 am, Dougster <paul.b.doug...@gmail.com> wrote:
> Anyone come across a proper solution to this? Is it a bug? Or am I
> being stupid?

I see the same with 4.5 (for both gnuplot.exe and wgnuplot.exe).

Cheers,
Rob

Dougster

unread,
Dec 12, 2011, 8:22:34 PM12/12/11
to
Thanks Rob, so I'm not going mad.

Does anyone fancy a dig around in the code and find out why the main
process doesn't finish?

Dougster

unread,
Dec 16, 2011, 7:06:14 PM12/16/11
to
Ok, I think I've cracked it. If the terminal type is not set to
windows you get zombies. But, if you issue the follow command you
don't!

wgnuplot.exe -p -e "plot sin(x); exit;"

Hope this helps,

Paul.

Dougster

unread,
Dec 16, 2011, 7:29:58 PM12/16/11
to
Correction - wgnuplot.exe -p -e "set terminal windows; plot sin(x);
exit;"

Dougster

unread,
Dec 16, 2011, 7:26:38 PM12/16/11
to
Sorry I meant to not get zombies issue the following:

wgnuplot.exe -p -e "set terminal windows; plot sin(x); exit;"

Unfortunately, the plot window doesn't seem to offer as many options
but at least the zombies have gone.

eame...@gmail.com

unread,
Jan 1, 2012, 10:44:51 PM1/1/12
to
I have just commited to CVS a fix for a zombie problem in the wxt
terminal and a similar
problem in the qt terminal. These were terminal-specific fixes, so if
you are seeing zombies
while using another terminal type this isn't going to help. In both
cases the sequence of
events that led to zombie creation was
1) gnuplot -persist (or set term ... persist)
2) create some plot windows
3) manually close one (wxt) or all (qt) of the windows
(the key is that the "closed" window is really just hidden)
4) exit the main gnuplot session
5) close the remaining plot windows
The windows closed in step (3) now belong to a zombie process.
You can't close the windows manually because they are hidden, and the
program can't close them because it has now exited.

The fixed code now truly closes all hidden windows at the time the
main program
exits.

sisyphus

unread,
Jan 7, 2012, 7:45:15 AM1/7/12
to
On Dec 17 2011, 11:26 am, Dougster <paul.b.doug...@gmail.com> wrote:

> wgnuplot.exe -p -e "set terminal windows; plot sin(x); exit;"

Yes, that works for me, too.

Cheers,
Rob

halbe...@googlemail.com

unread,
Aug 22, 2012, 6:19:48 PM8/22/12
to
This Problem still occurs in wgnuplot 2.6 when you open a gnuplot script with wgnuplot.exe (especially doubleclicking .plt scripts).

wgnuplot_pipes.exe helps but exits instantly unless you put a "pause -1" at the end of your script.

Windows currently opens .plt scripts with "wgnuplot". So lets look at the registry:

[HKEY_CLASSES_ROOT\gnuplot\shell\open\command]
@="\"C:\\Program Files (x86)\\gnuplot\\bin\\wgnuplot.exe\" -p \"%1\""

I simply changed -p to -persist and now Wgnuplot opens a new window (besides the plot window) when double clicking .plt scripts. I can close the wgnuplot window, so there is no zombie. Shouldn't be -p the same as -persist ?!
0 new messages