[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'system': bug or misunderstanding?

From: clerke
Subject: 'system': bug or misunderstanding?
Date: Tue, 1 Jan 2008 14:42:29 +0400
User-agent: KMail/1.9.7

Shouldn't these two commands both send 'foo' back to my screen? 
(Octave 3.0.0 on gentoo/amd64, but I noticed it in earlier Octave versions 

octave:1> system ("echo foo; exit 2",1,"async")
ans =  829
octave:2> foo

octave:2> system ("echo foo; exit 2",1,"sync")
ans =  2

In particular, i would have thought the sync version should do it.

I noticed this because 'edit foo' doesn't work for me - the editor (nano) 
runs, but does not display on my screen, yet the editor accepts input. 
It looks like the edit.m code uses [] for the return_output parameter, but 
testing that system call as above produces exactly the same results as 
return_output == 1.

I can use the editor from within Octave with:
system("nano foo")
but i'd like to be able to use 'edit foo' as documented (since it does other 
nice things as well). i totally misunderstanding how system should work? 
And either way, how do I get 'edit' to work?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]