Yes that helped. I was able to sort out the proper way to handle
processes.
Thanks,
Travis.
Venkat Saranathan <[EMAIL PROTECTED]> wrote:
No, Remember fork creates a copy of the parent's environment in the child's
process, so whenever you change the child's variable, it won't have any
e
No, Remember fork creates a copy of the parent's environment in the child's
process, so whenever you change the child's variable, it won't have any
effect on the parent's and vice versa.
One idea is to increase the child counter in the parent process and
decrement in the SIGCHLD handler which wil
Travis Thornhill wrote:
> I thought I understood this but maybe I don't.
Have you read the perlipc doc:
perldoc perlipc
It has examples on how to use fork.
> When perl forks it creates an exact copy of itself with open files, same
> variables, hashes, arrays, etc.
>
> But when a variable in
Peter Rabbitson wrote:
I think I am getting the idea of fork() all wrong. Here is an example:
my $pid = fork();
if ($pid) { # should apply to parent only?
exit;
}
sleep 1;
print "Test\n";
exit;
'Test' does not print. If I remove the 'sleep 1' - it prints. From what
I understood for
Jessee Parker wrote:
>
> Using Perl on a Linux system, is there a way to fork off x amount of copies
> then make a system wait until those copies are finished before forking off
> more copies? If so can you show me an example if possible. It would be
> greatly appreciated! TIA
http://www.stonehen
yes, it inherits just about everything:
from man page:
The fork() and fork1() functions create a new process. The
new process (child process) is an exact copy of the calling
process (parent process). The child process inherits the
following attributes from the parent process:
From: "Jessee Parker" <[EMAIL PROTECTED]>
> I know when you fork() a process the child is a duplicate of the
> parent, but does the forked copy have the same priority and time slice
> assigned to it or is it brand new?
>
> Jessee
This is operating system dependant!
Jenda
= [EMAIL PROTECTED]