Cygwin: lseek: return ESPIPE rather than EINVAL when called on a fifo
Thanks to Henri for tracking this down: https://cygwin.com/ml/cygwin/2018-10/msg00062.html Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
9479563e48
commit
323b48b975
@ -1237,6 +1237,7 @@ class fhandler_fifo: public fhandler_base_overlapped
|
|||||||
public:
|
public:
|
||||||
fhandler_fifo ();
|
fhandler_fifo ();
|
||||||
int open (int, mode_t);
|
int open (int, mode_t);
|
||||||
|
off_t lseek (off_t offset, int whence);
|
||||||
int close ();
|
int close ();
|
||||||
int dup (fhandler_base *child, int);
|
int dup (fhandler_base *child, int);
|
||||||
bool isfifo () const { return true; }
|
bool isfifo () const { return true; }
|
||||||
|
@ -221,6 +221,14 @@ out:
|
|||||||
return res == success;
|
return res == success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
off_t
|
||||||
|
fhandler_fifo::lseek (off_t offset, int whence)
|
||||||
|
{
|
||||||
|
debug_printf ("(%D, %d)", offset, whence);
|
||||||
|
set_errno (ESPIPE);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
fhandler_fifo::wait (HANDLE h)
|
fhandler_fifo::wait (HANDLE h)
|
||||||
{
|
{
|
||||||
|
13
winsup/cygwin/release/2.11.2
Normal file
13
winsup/cygwin/release/2.11.2
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
What's new:
|
||||||
|
-----------
|
||||||
|
|
||||||
|
|
||||||
|
What changed:
|
||||||
|
-------------
|
||||||
|
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
---------
|
||||||
|
|
||||||
|
- Return ESPIPE rather than EINVAL from lseek on a fifo.
|
||||||
|
Addresses: https://cygwin.com/ml/cygwin/2018-10/msg00019.html
|
Loading…
x
Reference in New Issue
Block a user