Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Re: background Win32 process'

by sevensven (Pilgrim)
on Oct 24, 2001 at 20:26 UTC ( [id://121166]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: background Win32 process'
in thread background Win32 process'

zuqif, the script I posted above is intended to launch another script in the background (daemon.pl in the example).

So, you need to change whatever needs to be changed to match your system (my perl install dir is non orthodox)

I tested the script before posting (even tryed to do a use strict, but it barfed some errors related to Win32 and I droped it, since this was just a code sample) and it worked as intended (by me, at least ;^)

I'll put here the progie that I used as the background process, save it as daemon.pl in the same dir as the previous code and the try running the previous code and checking for the c:\daemon.log file

use strict; my $log_file = 'c:\daemon.log'; open (LOG, ">$log_file") || die ("cant create $log_file : $!"); for ($i = 5 ; $i > 0 ; $i--) { print LOG "daemon running $i\n"; # print "daemon running $i \n"; sleep(1); } print LOG "thats all folks\n"; close LOG;
The first script could even acept as parameters the name of the perl script it should run in the background,

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: background Win32 process'
by zuqif (Hermit) on Oct 24, 2001 at 21:03 UTC
    Yeh, but how'd I get the 1st script to run in the background!?
    A wrapper for the wrapper!?

    Recursion anyone!? (:
    the 'qif;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://121166]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-19 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found