ikare has asked for the wisdom of the Perl Monks concerning the following question:
Maybe there are some syntax errors in there... But the idea remains the same. Now, I am going to walk the dog - Ikare#!/usr/bin/perl ################################## # # main.pl # ################################# use strict; use CGI::Carp 'fatalsToBrowser'; ######### Here we go: We read the forms and so ..... use Win32; use Win32::Process; my $ProcessObj; my stuffTerminated = false; Win32::Process::Create($ProcessObj, "c:/perl/bin/perl.exe", "perl c:/myPerlScriptsDir/waiting.pl", 0, NORMAL_PRIORITY_CLASS, ".") || die "Create"; ######### do stuff while user waiting sleep(10); ######### when we are done, we signal waiting.pl open S, ">c:/MyPath/signal.xxx"; print S "stuffTerminated"; close S; print "Content-type: text/html\n\n"; print "Thank you for waiting... blah-blah-blah"; exit; #!/usr/bin/perl ################################## # # waiting.pl # ################################# use strict; use CGI::Carp 'fatalsToBrowser'; if ( ! open(S, "c:/MyPath/signal.xxx") ) { #redirect to waiting my $redirect = "http://myserver/mywebsite/waiting.htm"; print "HTTP/1.0 303 See Other\r\n" if $ENV{PERLXS} eq "PerlIS"; # + for perlIS.dll"; print "Location: $redirect\n\n"; } exit; ################################# # #NOTE: waiting.htm has a refresher to waiting.pl ################################
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Printing that "waiting" page or call it win32::process::create problem
by fglock (Vicar) on Sep 27, 2002 at 16:30 UTC | |
by ikare (Initiate) on Sep 27, 2002 at 17:12 UTC | |
by blssu (Pilgrim) on Sep 27, 2002 at 20:30 UTC | |
by fglock (Vicar) on Sep 27, 2002 at 17:37 UTC | |
Re: Printing that "waiting" page or call it win32::process::create problem
by runrig (Abbot) on Sep 27, 2002 at 17:57 UTC | |
Re: Printing that "waiting" page or call it win32::process::create problem
by Dr. Mu (Hermit) on Sep 27, 2002 at 21:04 UTC |