Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Keep It Simple, Stupid
 
PerlMonks  

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

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 17: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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.