diff options
author | Christopher Faylor <me@cgf.cx> | 2000-10-07 18:12:11 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-10-07 18:12:11 +0000 |
commit | 57bf29e8258b921e632666ff17081805a5a62953 (patch) | |
tree | dc462b87bb49569be84b7f68ca9be56119f4db56 /winsup/cygwin/pipe.cc | |
parent | 4ea34a68506bcd5233be1a3bfca9b81b5f9234b2 (diff) | |
download | newlib-57bf29e8258b921e632666ff17081805a5a62953.zip newlib-57bf29e8258b921e632666ff17081805a5a62953.tar.gz newlib-57bf29e8258b921e632666ff17081805a5a62953.tar.bz2 |
* fhandler.h (fhandler_base): Remove obsolete _rpos and _rsize elements.
* fhandler.cc (fhandler_base::open): Ditto.
* fhandler.cc (fhandler_base::fhandler_base): Ditto.
(fhandler_base::read): Ditto. Add more debugging output. Don't issue a \r
when \r\n detected.
* pipe.cc (make_pipe): Streamline slightly. Make debug output more
interesting.
* strace.cc (strace::vsprintf): Use __progname where appropriate to distinguish
strace output when exec'ing.
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r-- | winsup/cygwin/pipe.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 2de4991..4a6e493 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -24,8 +24,9 @@ make_pipe (int fildes[2], unsigned int psize, int mode) SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," make_pipe"); HANDLE r, w; - int fdr, fdw; + int fdr = -1, fdw = -1; SECURITY_ATTRIBUTES *sa = (mode & O_NOINHERIT) ? &sec_none_nih : &sec_none; + int res = -1; if ((fdr = fdtab.find_unused_handle ()) < 0) set_errno (ENMFILE); @@ -50,16 +51,12 @@ make_pipe (int fildes[2], unsigned int psize, int mode) fildes[0] = fdr; fildes[1] = fdw; - debug_printf ("0 = pipe (%p) (%d:%p, %d:%p)", fildes, - fdr, fhr->get_handle (), fdw, fhw->get_handle ()); - - ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," make_pipe"); - return 0; + res = 0; } - syscall_printf ("-1 = pipe (%p)", fildes); + syscall_printf ("%d = make_pipe ([%d, %d], %d, %p)", res, fdr, fdw, psize, mode); ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," make_pipe"); - return -1; + return res; } extern "C" int |