From bug-octave-request at bevo dot che dot wisc dot edu Fri Jan 28 14:50:45 2000 Subject: undesired behavior of system() From: "John W. Eaton" To: Martin Buenner Cc: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 28 Jan 2000 14:51:12 -0600 (CST) On 28-Jan-2000, Martin Buenner wrote: | I noticed a problem with [out,stat]=system('program'), there 'program' | is a executable shell-command. From time to time, 'system()' returns a | return code 'stat' not equal to zero, even if 'program' had no problems. | | I verified the behavior with | (1) GNU Octave, version 2.0.14 (hppa1.1-hp-hpux10.20) | on a HP work station with HP-UX B.10.20 A 9000/778 | (2) GNU Octave, version 2.0.14 (alpha-suse-linux-gnu) | on a Linux 2.2.10 i686, pre-compiled by Suse. | | For testing the return code of the shell script, I run | | N=0;for i=1:10000,[out,stat]=system('ls');if stat,N++,endif;endfor | | N will vary if you start that sequence several times. For example: | In case (1) the result of two runs had been: N = 30, N = 28 | In case (2) the result of two runs had been: N = 685, N = 688 | | For further information I attach two files including the values of | octave_config_info | on my HP-installation, as well as on Linux. OK, I was able to reproduce this problem with 2.0.14, but not with 2.0.15 or the current development sources. So I think the problem has already been fixed. Thanks, jwe ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------