473,395 Members | 1,999 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,395 software developers and data experts.

Can't Stop Process On Windows

Dan

I have a python script running under Windows XP that I need to
terminate from the keyboard. A control-c works fine under Linux, but
not under Windows. I'm pretty sure that the culprit is 'select' that
I'm using to multiplex socket i/o, which seems to be blocking the
keyboard interrupt. Is there some way around this?

Dan

Jul 18 '05 #1
2 1936
Dan wrote:
I have a python script running under Windows XP that I need to
terminate from the keyboard. A control-c works fine under Linux, but
not under Windows. I'm pretty sure that the culprit is 'select' that
I'm using to multiplex socket i/o, which seems to be blocking the
keyboard interrupt. Is there some way around this?


Are you calling select with a long timeout? An alternative would be to call
select with a much shorter timeout, but call it multiple times from a loop.
Jul 18 '05 #2
Dan
On Tue, 12 Apr 2005 06:53:04 -0600, Dave Brueck
<da**@pythonapocrypha.com> wrote:

Are you calling select with a long timeout? An alternative would be to call
select with a much shorter timeout, but call it multiple times from a loop.


That seems to have fixed the problem. Changed it from no timeout to
one second.

Thanks

Dan

Jul 18 '05 #3

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

Similar topics

6
by: ScareCrowe | last post by:
Is there a way to stop the PHP cgi completely? I made a typo and got caught in an infinite loop. Usually I can wait until the execution time expires and fix the script but this time it kept going...
5
by: Dr. Who | last post by:
So here it is: handle unbuffered output from a child process. Here is the child process script (bufcallee.py): import time print 'START' time.sleep(10) print 'STOP' In Perl, I do:...
2
by: 0to60 | last post by:
I have a windows service that when started creates two threads: one thread that runs a TcpListener waiting for TcpClients to connect, and another thread that reads from the resulting sockets. My...
0
by: xixi | last post by:
hi, we are using db2 udb v8.1 on win 64 bit with fp3 with type 4 db2jcc.jar driver. when i execute this query , select id, arno01, arcd01, arno16, artx01, armo09, ardy09, arcc09, aryr09,...
0
by: strangedub | last post by:
I am working on a C# Windows program that needs to kill a known process. I have written code that works in development mode but hits an "Access Denied" exception when running the compiled program:...
10
by: Lars-Erik Aabech | last post by:
Hi! This issue have been discussed a lot, but I haven't found a solution that applies to ASP.NET. I have a library which does some operations on Excel documents, and it will be used in an...
88
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
46
by: Ian Boyd | last post by:
IIS5, on a Windows 2000 Server machine. Debeg.WriteLine "Hello, world!" How can i view it?
1
by: Primera | last post by:
I have an application that fixes some common problems that prevent the SMS Advanced Client from operating correctly. During this application I need to stop the Windows Management Instrumentation...
2
by: srcleveland | last post by:
I am trying to have a windows service stop itself. I am currently using the following code but I would like to find a way to stop the service without having to shell out to a command prompt ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.