develooper Front page | perl.beginners | Postings from February 2009

Perl fork() system call

Thread Next
From:
Chuck
Date:
February 18, 2009 15:59
Subject:
Perl fork() system call
Message ID:
ac684930-5cfb-4b0b-8743-484d729bc6d2@m4g2000vbp.googlegroups.com
Hello,

We have a GUI where, if a button is clicked, Putty (the remote access
program) is launched using

System("C:\\Progra~1\\Putty\\putty.exe");

is launched. However, when this is executed, the original GUI freezes,
and we cannot use it unless we close Putty. We tried using the fork()
command like this:

my $pid = fork()

if ( $pid == 0 ) {
  System("C:\\Progra~1\\Putty\\putty.exe");
  exit 0;
}

Now, if we run it, we can use the original GUI while Putty is running,
but when we close Putty, we get an error message along the lines of,
"The Perl Command Line Interpreter has stopped working" and the GUI
kills itself. Does anyone know what the problem might be, or how we
can launch Putty without freezing the GUI or causing it to kill itself
after closing Putty?

Thanks a lot.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About