slang-users mailing list

[2016 Date Index] [2016 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Send a signal to a running process?

Morten Bo Johansen <mbj@xxxxxxxxxxx> wrote:
> So the question is, how can I send a SIGHUP to the instance of mupdf
> that is associated with the jed buffer when pressing the key to update
> the display?

>    ifnot (__is_initialized (&pdfviewer_pid))
>     {
>         pdfviewer_pid = open_process ("mupdf", pdf_file, 1);
>         set_process (pdfviewer_pid, "output", &show_pdfviewer_error);
>         set_process (pdfviewer_pid, "signal", &pdfviewer_signal_handler);
>         process_query_at_exit (pdfviewer_pid, 0);
>     }
>    else
>      % this is of course not tenable, but illustrates what I want
>      () = system ("kill -hup $(pidof /usr/lib/mupdf/mupdf-x11)");

Try: signal_process (pdfviewer_pid, 1);

Here, 1 is SIGHUP.  I see that the SIG* constants were not made
available for jed.  I will add that to my TODO list.

For list information, visit <>.

[2016 date index] [2016 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]