help-octave
[Top][All Lists]
Advanced

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

system() implementation is somehow broken


From: Dr. Johannes Zellner
Subject: system() implementation is somehow broken
Date: Wed, 20 Oct 2010 23:31:46 +0200

Hi,

I struggled accross the fact that console vim can't be used as editor.
Apparently, this is due to the fact, that edit() uses system() and system() redirect stdout "sometimes".
The code in edit() which fails is
system (sprintf (FUNCTION.EDITOR, strcat ("\"", path, "\"")), [], FUNCTION.MODE);

Here's what I observe:

system('vim tmp.txt') % -- works

all of the following do NOT work and give the message: "
Vim: Warning: Output is not to a terminal"

system('vim tmp.txt', [])
system('vim tmp.txt', [], 'sync')
system('vim tmp.txt', 'sync')

so if more than one argument is supplied to system(), stdout seems to be redirected (even if it is not used).

This is a bug in the system() implementation IMHO.

regards,
--
Johannes

reply via email to

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