in reply to Stopping a file handle process in NT

Not that I'll ever understand NT but, you're opening PRG as an input handle, but you analyze the output? Goes to a well known location? Can you open my.exe, do your business and close it each time? I'd poke around activestate and Dave Roth's site, seems the end service has to be using a trappable signal; you just need to find the right one. Finally, can you open my.exe first ("my.exe | perl my.pl") so that my.exe gets the service killed signal also? Just whistling past the NT-yard ...

a

  • Comment on Re: Stopping a file handle process in NT

Replies are listed 'Best First'.
Re: Re: Stopping a file handle process in NT
by chaydog (Acolyte) on Jan 23, 2001 at 21:34 UTC
    My work around is have another script/batch file kick off the perl program when you start the service via GUI or net start. I added a sub routine to make sure the service is running "while(serviceRunning() ) {}" if you stop the service the perl program will exit gracefully. Trapping signals is much cooler but this works. thanks