Dear all, I have a problem when using a system() command inside a script using (or calling another script using) Inline Octave. It seems that I get a zombie child process. The command is executed but never comes back to the main program.
I've added a small piece of code which works fine if you comment the following line: &call_system; Any help would be greatly appreciated. Thanks a lot, Etienne. ========================== CODE ========================== #!/usr/bin/perl package toct; use warnings; use strict; sub new { my $class = $_[0]; my $objref = { _argu => $_[1], }; bless $objref, $class; return $objref } sub oct { my $argu = $_[0]{_argu}; use Inline Octave => q{ ## Inline::Octave::oct_mean (nargout=1) => mean }; # Recover the data my @values = split /::/, $argu; my $mean = new Inline::Octave oct_mean( [EMAIL PROTECTED] ); print "Octave mean: ", $mean->disp(), "\n"; my $out = $mean->disp(); return $out; }; sub call_system { print "Use system command:\n"; system "dir"; } my $o = toct->new("12::13::14"); $o->oct; &call_system(); # Line to comment/uncomment # The following was also tried #use POSIX "sys_wait_h"; #my $w; #do { # $w = waitpid(-1,&call_system); #} until $w == -1; 1; ======================= END CODE =========================