Re: What signal to send to terminate gnuplot process?

Mirko Vukovic <[email protected]> Mon, 5 Feb 2024 20:28:24 -0500
Newsgroups gmane.comp.graphics.gnuplot.user
Message-ID <CAO73BAC04eLoDVOWcEVi-vUejGwR2bEn7KL4KQ0thiH63ezFeQ@mail.gmail.com>
Thanks for replying. My answers are below

On Sun, Feb 4, 2024 at 10:20 AM Peter Rockett via gnuplot-info <
[email protected]> wrote:

> Two questions:
>
> 1) Why do you want to send a SIGTERM to the process? Why isn't "exit"
> (which you say works) good enough? The signal handler -- either the
> default or an over-ridden version -- would typically invoke the system
> call that actually shuts down the process. Which is probably what the
> gnuplot "exit" command does one way or another.
>

You are correct that I really don't need to send SIGTERM. The reason is my
testsuite which is in 3 layers:
1. Lifecycle
2. IO streams
3. sending commands and reading results

I wanted the first layer of the test suite (lifecycle) to be independent of
sending commands (last layer).

I agree that this is somewhat of an overkill. But I was curious if it could
be done.



> 2) What OS are you using? Windows, for example, doesn't use signals -
> they are a UNIX/Linux/MacOS(?) thing. I suspect sending a signal on
> Windows will just be ignored, which is consistent with the behaviour you
> seem to be observing.
>

I am on Windows 11 using gnuplot delivered via MSYS2. Since my original
post, I learned that I can use
taskkill to terminate processes.


>
> FWIW: The exact value of SIGTERM will be defined in a C header file
> somewhere, probably "signals.h".
>

I did not find that file, but I did not look terribly hard.


>
> P.
>

Thanks,

Mirko

_______________________________________________
gnuplot-info mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info