Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Signals vs. Windows

by eyepopslikeamosquito (Chancellor)
on Oct 03, 2012 at 20:57 UTC ( #997132=note: print w/replies, xml ) Need Help??


in reply to Signals vs. Windows

If the child thread doesn't complete within some time limit, the parent sends the child a signal, and the child in turn attempts to kill the external process.
If this is Windows-only code, and the intent is to run an external command with a time limit, I suggest you take a look at the Win32::Job module. For a simple example of using it, see Re: Timing Windows commands.

Since signals don't play nicely with threads generally and since signals are not part of the native Win32 API, I would stay away from signals for your application.

Replies are listed 'Best First'.
Re^2: Signals vs. Windows
by DanEllison (Beadle) on Oct 04, 2012 at 11:15 UTC
    No, this is not Windows only.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997132]
help
Chatterbox?
[Corion]: r@j: Have you printed what '$Process_java' prints? How will Perl know that you mean a variable named $Process and not a variable named $Process_java? Also, why doesn't Perl complain when you're using strict in your program?
[erix]: thanos1983: s/ For login purposes / For logging purposes / # I suppose ...
[r@j]: Actully $Process_Java this is getting from config file

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (14)
As of 2017-10-23 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (280 votes). Check out past polls.

    Notices?