in reply to Re: Re: perl fork cmd on Windows 2000
in thread perl fork cmd on Windows 2000
You can spawn off another process using Win32::Process. Below is some code I used to open a file in Notepad from a Tk program. Win32::Process is documented pretty well and there are plenty of examples out there. As other monks have stated, I'd be very wary of using fork with Perl on Windows. I've experimented with fork some on Windows and it seems like if you created more than a couple processes, it would crash in various ways.
my $ProcessObj; Win32::Process::Create($ProcessObj, 'C:/WINNT/notepad.exe', "notepad $file", 0, NORMAL_PRIORITY_CLASS, ".")|| die "Couldn't open the file $file\n";
«Rich36»
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: perl fork cmd on Windows 2000
by TheYoungMonk (Sexton) on Dec 18, 2002 at 05:36 UTC | |
by BrowserUk (Patriarch) on Dec 18, 2002 at 05:59 UTC |
In Section
Seekers of Perl Wisdom