how to send a SIGINT to a Python process?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michele Simionato

    #1

    how to send a SIGINT to a Python process?

    Is there a way to send a SIGINT/KeyboardInterru pt to a
    Python process (knowing the pid) that works both on Unix and Windows?

    Michele Simionato

  • wittempj@hotmail.com

    #2
    Re: how to send a SIGINT to a Python process?

    AFAIK there isn't. You could browse through this
    http://starship.python.net/crew/tmick/ to get an idea on how to kill on
    both platforms.

    Comment

    • Sion Arrowsmith

      #3
      Re: how to send a SIGINT to a Python process?

      Michele Simionato <michele.simion ato@gmail.com> wrote:[color=blue]
      >Is there a way to send a SIGINT/KeyboardInterru pt to a
      >Python process (knowing the pid) that works both on Unix and Windows?[/color]

      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@chiark.gr eenend.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

      Comment

      Working...