* 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.
This commit is contained in:
Christopher Faylor
2000-10-07 18:12:11 +00:00
parent 4ea34a6850
commit 57bf29e825
5 changed files with 69 additions and 109 deletions

View File

@@ -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