|
From: Peter R. <p.r...@sh...> - 2024-02-04 15:19:52
|
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. 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. FWIW: The exact value of SIGTERM will be defined in a C header file somewhere, probably "signals.h". P. On 03/02/2024 15:39, Mirko Vukovic wrote: > Hello, > > I am writing an interface to gnuplot from common lisp (CL). The CL process > calls gnuplot and sets up the input & output handles. > > I am able to start the gnuplot process, send commands, and fetch output > (such as from "show version"). I can also generate plots. > > I can shut down the process by sending the "exit" command. > > But I'd also like to send a signal (such as SIGTERM) to shut gnuplot down. > > I tried this by sending the numeral 15 but that did not shut down the > process. > > I searched the source code at a fork on github, found SIGTERM there, but > not what value to use for it. Nor am I sure that SIGTERM would shut it down. > > Please note, that I am very new to this kind of communication with > processes. I am possibly/likely misunderstanding how things are supposed to > work. Maybe I am misunderstanding the purpose of SIGTERM, or don't have the > correct code for it. > > Thanks, > > Mirko > > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |