octave-bug-tracker
[Top][All Lists]
Advanced

[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:03:35 +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

URL:
  <http://savannah.gnu.org/bugs/?47614>

                 Summary: pipe() does not work on Windows
                 Project: GNU Octave
            Submitted by: tmacchant
            Submitted on: 2016年04月04日 03時03分34秒
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Tatsuro MATSUOKA
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.1
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

The topic has been discussed in Octave-Maintainers Mailing list:

http://octave.1599824.n4.nabble.com/optim-struct-parallel-pre-release-check-on-Windows-td4675995.html

Octave for windows seems to implement pipe();

>> help pipe
'pipe' is a built-in function from the file libinterp/corefcn/syscalls.cc
 <snip>


However, that does not work correctly using the test by Mike:
http://octave.1599824.n4.nabble.com/optim-struct-parallel-pre-release-check-on-Windows-td4675995.html#a4676026


[a, b] = pipe (); 
fputs (b, "Hello world\n\n\n\n"); 
fflush (b); 
result = fgets (a)


On octave on CygwinX64, the above work as expected.


>>  [a, b] = pipe ();
  fflush (b);
  result = fgets (a) >>   fputs (b, "; llo world\n\n\n\n")
>>   fflush (b);
>>   result = fgets (a)
result = Hello world


However, octave for (Native) windows, the above give incorrect results:


>>  [a, b] = pipe ();
>>   fputs (b, "Hello world\n\n\n\n");
error: fputs: invalid stream number = -1
>>   fflush (b);
error: fflush: invalid stream number = -1
>>   result = fgets (a)
error: fgets: invalid stream number = -1


Implementation pipe for native window is not correct.

At this time, I have not look into libinterp/corefcn/syscalls.cc 
but this is the start, I think







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47614>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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