EggMan has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: TCL, fork and memory
by davidj (Priest) on Aug 03, 2004 at 19:50 UTC
    Let me see, here.

    1) You provide no code.
    2) You provide no information as to what the child processes are doing.
    3) You provide no OS information (not that it's really necessary, but it could help).

    Sorry, dude. Like most all the other monks here, I never quite gained the ability to help others with "guess what my code looks like and guess what my child processes are doing" fork() problems.

    davidj

      Sorry for a month+ delay and for no code delivered.

      My code is a GUI for setting some parameters and
      eventually launching a PERL script Xtimes
      with some arguments.

      the code body is:

      TK code
      .... external loop:

      while (!defined($pid = fork()))
      { print "NO PIDS..\n"; sleep 1 }
      if (!$pid) { system "..." ; CORE::Exit(); } ## NO "&" !
      else { $$TasksHash_{$pid}=$ShownButtons{$key}};

      .... end of external loop.

      INT code:
      sub CHILED
      {
      my $stiff;
      while (($stiff = waitpid(-1, &WNOHANG)) > 0)
      { $$TasksHash_{$stiff}->destroy if $$TasksHash_{$stiff}}
      $SIG{CHLD} = \&CHILED ;
      }

      The "system" call dies when "out of memory",
      why this happens?,br> Thanks, Daniel.