473,698 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create a process with a "time to live"

Hey python[],

I want to create a process that would "expire" if it didn't complete in
a set amount of time. I don't seem to see any timeout values to pass
os.system - does anyone know of a good way to do this?

So far all I can think of is some kind of watchdog thread - but that
seems like overkill to do such a simple thing.
-Carl


--

Carl J. Van Arsdall
cv*********@mvi sta.com
Build and Release
MontaVista Software
Aug 15 '08 #1
0 972

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

Similar topics

1
1451
by: a_geek | last post by:
Hello, I'm writing a small program that needs to check Unix timestamps for falling into an interval (typical usage: ./program 2005-03, you get the idea). Now, I create two time stamps from the user's input to create the interval's borders using mktime(). Trying to check the sanity of my program, I also converted the values back to tuples using localtime(). Unfortunately, I get back one of them with the DST flag set, and the other with...
2
2773
by: Howard Jess | last post by:
Given the html at the end of this message, I see how a DOM NodeList exhibits its "live" behavior; that is, adding elements to a document can change any NodeList variables, when there's *no* code that refers to them. I suppose I can imagine cases where this idea would be useful, but I can imagine many more where I'd like to get a *static* list of, e.g., the <p> elements in my document, and do something with them, regardless of any I...
22
4907
by: Qopit | last post by:
Hi there, I'm pretty new to Python and am trying to figure out how to get "will this code compile?"-like code checking. To me this is a pretty basic language/environment requirement, especially when working with large projects. It is *much* better to catch errors at "compile-time" rather than at run-time. One thing I've "found" is the PyChecker module (conveniently embedded in SPE), but it doesn't seem to do that great of a job. ...
2
7975
by: Paul Brady | last post by:
I have non-computer skilled users entering data into a form. There are certain ranges of values which, if they enter them, make no sense in the application, but I can't test them until they try to close out the form, in which case I can look at the entire set of values and see if they're OK. So, I have this code. for the "Before Update" event: if (their variables are inappropriate) then msgbox "You've entered bad variables (or some...
9
6014
by: rnn98 | last post by:
hi, my multithread application, running under solaris box, is crashing eventually. I tried to spot and substitute functions not "thread safe", but I guess my search wasn't good enough. I have put localtime_r and asctime_r where I was using localtime and asctime. But I didn't find any correspondent _r function to "time".Also, I found that "readdir" is not thread safe. But what about "scandir"? Thanks for any help
0
1856
by: warenbe | last post by:
hi i've got a problem first sorry fot my bad english! i'm writing a soft wich send a file on a server using webclient.UploadFileAsync. it work fine but only with small files... in fact it depend not on the size of the file but on the time my soft take to send it: if the time to send the file is more than 1 min 40 sec, my soft says that the file has been uploaded, but in fact only a part of the file had been uploaded... how can i...
1
4209
by: johnny | last post by:
Is there any open source "live web chat support" program or script out there? Any you can recommend?
2
1800
by: Ben | last post by:
Hi, i use the login control with the option "remember me next time". What's the default expire time and is it possible to change it? Thanks Ben
0
869
by: Fredrik Lundh | last post by:
Carl J. Van Arsdall wrote: simple approach: use subprocess.Popen to fork off the external command, then sleep for a short while, check if it's done, sleep a little longer if it hasn't, etc. when you've waited long enough, use os.kill to kill the process. (if you want to terminate a function in your own program, you can use the alarm signal. see e.g. http://code.activestate.com/recipes/307871/ )
0
8680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.