473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to send a SIGINT to a Python process?

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

Michele Simionato

Oct 1 '05 #1
2 2876
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.

Oct 2 '05 #2
Michele Simionato <mi***************@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 -- si***@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
Oct 3 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Jane Austine | last post by:
As far as I know python's threading module models after Java's. However, I can't find something equivalent to Java's interrupt and isInterrupted methods, along with InterruptedException....
1
by: Gernot Hillier | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I'm the developer of a Linux ISDN application which uses embedded Python for controlling the communication. It starts several threads (i.e....
0
by: Keith | last post by:
I got this to work, but was hoping there was a better way. I was hoping that I wouldn't have to use globals. I wouldn't doubt that I could be totally off in what I am doing. Here is some...
2
by: Bram Stolk | last post by:
Hello, I catch SIGINT signals with a handler. In the handler, I use fd's to write some data to a child process. Is this valid? Because the data never arrives, and I wonder what I'm doing...
4
by: jas | last post by:
I have a basic client/server socket situation setup....where the server accepts a connection and then waits for commands. On the client side, I create a socket, connect to the server...then I...
1
by: psawant | last post by:
Hi! I want to handle "kill","ctrl-c" sigkill,sigint signals in vb.net. I have done it once in C. It was a cake wake.Could not a figure out how to do the same in vb.net. Thanks all.. In...
3
by: William Stacey [MVP] | last post by:
How do you send Ctrl-C to a standard input stream? Just sending 03 does not work. -- William Stacey
3
by: BuddyWork | last post by:
Hello, Could someone please explain why the Socket.Send is slow to send to the same process it sending from. Eg. Process1 calls Socket.Send which sends to the same IP address and port, the...
0
by: Buddy Home | last post by:
There is two examples of code. Example 1. Send and Receive within the same process. Put this code in a console app called SendAndReceive and run the code. using System; using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.