Paul Rubin wrote:
> To get even more OS-specific, AF_UNIX sockets (at least on Linux) have
> a feature called ancillary messages that allow passing file
> descriptors between processes. It's currently not supported by the
> Python socket lib, but one of these days... . But I don't think
> Windows
Paul Rubin wrote:
> Maybe the child process can just use sigalarm instead of a separate
> thread, to implement the timeout.
Already tried that, signals works only in main thread.
> To get even more OS-specific, AF_UNIX sockets (at least on Linux) have
> a feature called ancillary messages that al
Bryan Olson <[EMAIL PROTECTED]> writes:
> First, a portable worker-process timeout: In the child process,
> create a worker daemon thread, and let the main thread wait
> until either the worker signals that it is done, or the timeout
> duration expires. As the Python Library Reference states in
> s
Bryan Olson wrote:
> First, a portable worker-process timeout: In the child process,
> create a worker daemon thread, and let the main thread wait
> until either the worker signals that it is done, or the timeout
> duration expires.
It works on QNX, thanks a lot, your reply was very helpful!
> I
Bryan Olson wrote:
[Some stuff he thinks is right, but might not answer the real
question]
Definitely look into Peter Hanson's answer.
Olson's answer was about timing-out one's own Python code.
Bryan Olson has heretofore avoided referring to himself in the
third person, and will hence forth end
Jacek Poplawski had written:
>> I am going to write python script which will read python
>> command from socket, run it and return some values back to
>> socket.
>>
>> My problem is, that I need some timeout.
Jacek Poplawski wrote:
> After reading more archive I think that solution may be t
Jacek Popławski wrote:
> I am going to write python script which will read python command from
> socket, run it and return some values back to socket.
(Sounds like a huge security risk, unless you have tight control over
who can connect to that socket.)
> My problem is, that I need some timeout
Jacek Popławski wrote:
> Hello.
>
> I am going to write python script which will read python command from
> socket, run it and return some values back to socket.
>
> My problem is, that I need some timeout. I need to say for example:
>
> os.system("someapplication.exe")
>
> and kill it, if it
You'll need a watchdog thread that handles the other threads. The
watchdog thread just builds a table of when threads were started, and
after a certain # of seconds, expires those threads and kills them.
--
http://mail.python.org/mailman/listinfo/python-list
After reading more archive I think that solution may be to raise an
Exception after timeout, but how to do it portable?
--
http://mail.python.org/mailman/listinfo/python-list
Hello.
I am going to write python script which will read python command from
socket, run it and return some values back to socket.
My problem is, that I need some timeout. I need to say for example:
os.system("someapplication.exe")
and kill it, if it waits longer than let's say 100 seconds
I
11 matches
Mail list logo