octave-maintainers
[Top][All Lists]
Advanced

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

Re: pipes in Octave on Windows?


From: Mike Miller
Subject: Re: pipes in Octave on Windows?
Date: Sun, 3 Apr 2016 18:14:47 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

On Sun, Apr 03, 2016 at 19:27:16 -0400, Nicholas Jankowski wrote:
> Neophyte question here:
> 
> Is this a system/shell issue or something more internal to octave? Windows
> shell has a pipe construct. It calls them handles, but see here:
> https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true

It's related, but at the C system library level. POSIX provides a
function pipe() that gives the calling process two open file
descriptors, one that can be written to, and another that can be read
from to get the data written on the other.

Windows provides a function _pipe that looks like it's supposed to be
essentially the same function.

I found this page [1] indicating that Windows _pipe function doesn't
work in some situations, may be the reason it is failing in Octave. If
someone wants to keep poking at gnulib to try to get _pipe to work,
that's one avenue to pursue.

[1]: https://msdn.microsoft.com/en-us/library/edze9h7e.aspx

> Rather than figure out how to implement linux pipes on windows, could some
> sort of ispc() syntax dependency be used?

Someone could write some code for the Windows API using the CreatePipe
function [2] that may work when the _pipe function doesn't. Octave
expects pipe() to return an integer-valued file descriptor, same as
fopen, so it can be used with all the standard file I/O functions.

[2]: 
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365152%28v=vs.85%29.aspx

-- 
mike



reply via email to

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