D
Dave Saville
In C terms a fork/exec of foo execing bar, where both are executables,
will show in ps two processes foo and bar and IIRC the parent pid of
bar will be foo's.
I have a perl script that forks and execs.
my $pid = fork()
die "Can't fork $!" if ! defined $pid;
unless ( $pid )
{
# child
exec "mplayer.........
}
print "$pid\n";
.....
Assume $pid is 123 If I run a ps I get
pid ppid prog
100 *** cmd
101 100 perl
123 100 perl
124 123 sh
125 124 sh
126 125 mplayer
Which is not what I would have expected.
I would have expected
100 *** cmd
101 100 perl
123 101 mplayer
Or very close. Of course this could be another OS/2 oddity
TIA
will show in ps two processes foo and bar and IIRC the parent pid of
bar will be foo's.
I have a perl script that forks and execs.
my $pid = fork()
die "Can't fork $!" if ! defined $pid;
unless ( $pid )
{
# child
exec "mplayer.........
}
print "$pid\n";
.....
Assume $pid is 123 If I run a ps I get
pid ppid prog
100 *** cmd
101 100 perl
123 100 perl
124 123 sh
125 124 sh
126 125 mplayer
Which is not what I would have expected.
I would have expected
100 *** cmd
101 100 perl
123 101 mplayer
Or very close. Of course this could be another OS/2 oddity
TIA