Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: TCL, fork and memory

by davidj (Priest)
on Aug 03, 2004 at 19:50 UTC ( [id://379808]=note: print w/replies, xml ) Need Help??


in reply to TCL, fork and memory

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

Replies are listed 'Best First'.
Re^2: TCL, fork and memory
by EggMan (Initiate) on Sep 08, 2004 at 13:09 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://379808]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-24 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found