'system': bug or misunderstanding?
clerke
clerke at eim.ae
Fri Jan 4 05:42:38 CST 2008
On Tuesday 01 January 2008 14:42:29 clerke wrote:
<*bump*>
No comments?
> 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
> too).
>
> 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
> octave:3>
> octave:3>
>
> 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).
>
> Sooo...am i totally misunderstanding how system should work?
> And either way, how do I get 'edit' to work?
>
> Thanks,
> wayne
More information about the Help-octave
mailing list