[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with system
From: |
Martin Buenner |
Subject: |
problem with system |
Date: |
Fri, 28 Jan 2000 09:38:15 +0100 |
Dear octave users and developpers,
inside octave I need to start a shell-script and to control its exit
code. Currently, I am using 'system()' similar to
[out,stat]=system('program');
if stat,error('theres a problem');endif
Unfortunately, from time to time 'stat' is not zero even if the script
has exited correctly.
If I run the following code i.e. for testing
N=0;for i=1:1000,[out,stat]=system('ls');if stat,N++,endif;endfor
the result will be N=(80-100).
What's the problem?
Best regards, Martin
--
*****************************************************************
* Dr. Martin J. Buenner *
* EPCOS AG *
* Surface Acoustic Wave Components *
* OFW E NT *
* Anzinger Str. 13 Phone: ++49 89 636 26182 *
* D-81617 Munich Fax: ++49 89 636 27304 *
* Germany E-mail: address@hidden *
*****************************************************************
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------
- problem with system,
Martin Buenner <=