|
From: Mirko V. <mir...@gm...> - 2024-02-06 01:29:12
|
Thanks for replying. My answers are below On Sun, Feb 4, 2024 at 10:20 AM Peter Rockett via gnuplot-info < gnu...@li...> 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 |