Hi Bernie,

Bill L. already adviced You about how to handle processes in win environment, 
but to restart db instances or other programs in windows they normally exists 
as services with fixed names. And there is other tools for restarting etc.

Try this.               Win32::Service - manage system services in perl

The name of the service You can find in 
Start\controlPanel\AdministrativeTools\Services.


Terveisin - Best regards 

Ari 
____________________________________ 


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bernie Cosell
Sent: 8. kesäkuuta 2006 18:09
To: [email protected]
Subject: starting/killing processes, newbie questions

I'm a pretty experienced Perl programmer, but only on Unix and I'm a rank 
newbie on Windows.  I'd like to write a very simple program to stop and 
restart a program [so I can update its DB] and this'd be a snap on Unix 
but I can't quite get my head around it on XP.

First, starting the new version: would I do a good old fork/exec?  Or 
should I try to figure out how to use Win32::Process::Create? [or 
something else?]

Second, how to find and kill the existing process?  No "/dev/proc" to 
find the existing process ID -- so how would I find it? [the task I want 
to kill runs in the 'background', generally started with the "Startup" 
tasks, and has a systray icon]. And once I find it, I assume it'd be best 
to use Win32::Process:KillProcess rather than kill(1, $pid)?  

  /bernie\


-- 
Bernie Cosell                     Fantasy Farm Fibers
mailto:[EMAIL PROTECTED]     Pearisburg, VA
    -->  Too many people, too few sheep  <--       



_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to