Scenario: I've to spawn 2 processes on windows. one is client process and second is server process. Client passes input file to server and server reads it and generate output file.

What I've done: I've used one start_comm.pl file which spawns processes using PerlACE:Process module. This module contains Process_Win32.pm which uses Win32::Process:create to spwan new process. I pass client and server parameters to start_comm.pl file which again call PerlACE module and then Win32::Process::create mathod.

Problem: Server doesn't generate any output file at desired location. Also I don't see any error while creating process or anywhere. Process just starts in new window and disappears within less than a second.

start_comm.pl
use PerlACE::Process; my $server; $server = new PerlACE::Process("$server_name", "$server_param"); $status = $server->Spawn (); $client = new PerlACE::Process("$client_name", "$client_param"); print $client->CommandLine(), "\n"; <br/> Thanks in advance. $status = $client->Spawn ();

snippet from Process_Win32.pm
Win32::Process::Create ($self->{PROCESS}, $executable, $cmdline, 0, CREATE_NEW_CONSOLE, ".");

Please let me know if I am missing something.

In reply to Win32::Process::Create Process exits before finishing execution by ashah21

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.