Dear all,

 as suggested by one user of the mailing list, here is some information about my 
running environment:

 OS: RedHat 8.0
 Perl: 5.008
 Octave version: 2.1.36
 modules versions: Inline-0.44, Parse_RecDescent-1.94, Inline_Octave-0.20

Cheers,

Etienne.

PS: it follows the original email in attachment
--- Begin Message ---
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 =========================



--- End Message ---

Reply via email to