[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47614] pipe() does not work on Windows
From: |
Tatsuro MATSUOKA |
Subject: |
[Octave-bug-tracker] [bug #47614] pipe() does not work on Windows |
Date: |
Mon, 04 Apr 2016 03:22:03 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 |
Follow-up Comment #1, bug #47614 (project octave):
I have a quick looked at into libinterp/corefcn/syscalls.cc
http://octave.org/doxygen/4.1/d7/dba/syscalls_8cc_source.html
929 DEFUNX ("pipe", Fpipe, args, ,
930 "-*- texinfo -*-n
931 @deftypefn {Built-in Function} address@hidden, @var{write_fd},
@var{err}, @var{msg}] =} pipe ()n
932 Create a pipe and return the reading and writing ends of the pipe inton
933 @var{read_fd} and @var{write_fd} respectively.n
934 n
935 If successful, @var{err} is 0 and @var{msg} is an empty string.n
936 Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependentn
937 error message.n
938 @seealso{mkfifo}n
939 @end deftypefn")
940 {
941 octave_value_list retval;
942
943 retval(3) = std::string ();
944 retval(2) = -1;
945 retval(1) = -1;
946 retval(0) = -1;
947
948 int nargin = args.length ();
949
950 if (nargin == 0)
951 {
952 int fid[2];
953
954 std::string msg;
955
956 int status = octave_syscalls::pipe (fid, msg);
957
958 if (status < 0)
959 retval(3) = msg;
960 else
961 {
962 FILE *ifile = fdopen (fid[0], "r");
963 FILE *ofile = fdopen (fid[1], "w");
964
965 std::string nm;
966
967 octave_stream is = octave_stdiostream::create (nm, ifile,
968 std::ios::in);
969
970 octave_stream os = octave_stdiostream::create (nm, ofile,
971
std::ios::out);
972
973 retval(2) = status;
974 retval(1) = octave_stream_list::insert (os);
975 retval(0) = octave_stream_list::insert (is);
976 }
977 }
978 else
979 print_usage ();
980
981 return retval;
982 }
in the above, I could see
int status = octave_syscalls::pipe (fid, msg);
The above things are what I have done at this moment.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47614>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, Tatsuro MATSUOKA, 2016/04/03
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows,
Tatsuro MATSUOKA <=
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, Tatsuro MATSUOKA, 2016/04/03
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, Tatsuro MATSUOKA, 2016/04/03
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, Mike Miller, 2016/04/04
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, Tatsuro MATSUOKA, 2016/04/04
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, Mike Miller, 2016/04/05
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, John Donoghue, 2016/04/05
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, Mike Miller, 2016/04/05
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, John Donoghue, 2016/04/05
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, John Donoghue, 2016/04/05
- [Octave-bug-tracker] [bug #47614] pipe() does not work on Windows, Mike Miller, 2016/04/06