help-octave
[Top][All Lists]
Advanced

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

"save" to and "load" from file descriptor


From: Olaf Till
Subject: "save" to and "load" from file descriptor
Date: Sun, 10 Jun 2007 16:16:53 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hi,

I would like to send octave variables (I mean variables created with
"m-code", more exactly: a cell array) from one octave process to
another (on the same machine), using a pipe created with the
(interpreted) "pipe ()" command. The "save" and "load" commands seem
suitable for that, but need to be given a filename or "-" for stdout
or stdin. But I think it is no clean way, and may be unnecessarily
slow, to create a file or a named pipe for data exchange. Trying to
work with an unnamed pipe and "save ('-', ...)" and "load('-')", I had
no success trying "dup2 (pipe_in_descriptor, stdout)" on the sender
side and "dup2 (pipe_out_descriptor, stdin)" on the receiver side,
since the latter made octave abort ("stdin no tty"). Probably the
"save" and "load" functionality should be made available when file
descriptors are supplied instead of filenames, so that "save" and
"load" also work with pipes.

Can the code used by "save" and "load" be accessed from an oct-file,
supplying it with a file descriptor?

Olaf


reply via email to

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