how to send a SIGINT to a Python process?

Sion Arrowsmith siona at chiark.greenend.org.uk
Mon Oct 3 11:04:06 EDT 2005


Michele Simionato <michele.simionato at gmail.com> wrote:
>Is there a way to send a SIGINT/KeyboardInterrupt to a
>Python process (knowing the pid) that works both on Unix and Windows?

No. Windows doesn't support the sending of signals between processes
(with the exception of an equivalent of SIGKILL). I guess this explains
why server processes running on Windows need to be shutdown and
restarted (at least) if you change their configuration -- there's no
(convenient or standardised) way of doing the equivalent of SIGHUP.

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list