Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r--winsup/cygwin/pipe.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
index 4a6e49345..37aaaa856 100644
--- a/winsup/cygwin/pipe.cc
+++ b/winsup/cygwin/pipe.cc
@@ -15,6 +15,7 @@ details. */
#include "cygerrno.h"
#include "fhandler.h"
#include "dtable.h"
+#include "cygheap.h"
#include "thread.h"
#include "security.h"
@@ -28,16 +29,16 @@ make_pipe (int fildes[2], unsigned int psize, int mode)
SECURITY_ATTRIBUTES *sa = (mode & O_NOINHERIT) ? &sec_none_nih : &sec_none;
int res = -1;
- if ((fdr = fdtab.find_unused_handle ()) < 0)
+ if ((fdr = cygheap->fdtab.find_unused_handle ()) < 0)
set_errno (ENMFILE);
- else if ((fdw = fdtab.find_unused_handle (fdr + 1)) < 0)
+ else if ((fdw = cygheap->fdtab.find_unused_handle (fdr + 1)) < 0)
set_errno (ENMFILE);
else if (!CreatePipe (&r, &w, sa, psize))
__seterrno ();
else
{
- fhandler_base *fhr = fdtab.build_fhandler (fdr, FH_PIPER, "/dev/piper");
- fhandler_base *fhw = fdtab.build_fhandler (fdw, FH_PIPEW, "/dev/pipew");
+ fhandler_base *fhr = cygheap->fdtab.build_fhandler (fdr, FH_PIPER, "/dev/piper");
+ fhandler_base *fhw = cygheap->fdtab.build_fhandler (fdw, FH_PIPEW, "/dev/pipew");
int binmode = mode & O_TEXT ? 0 : 1;
fhr->init (r, GENERIC_READ, binmode);
@@ -72,7 +73,7 @@ _pipe (int filedes[2], unsigned int psize, int mode)
int res = make_pipe (filedes, psize, mode);
/* This type of pipe is not interruptible so set the appropriate flag. */
if (!res)
- fdtab[filedes[0]]->set_r_no_interrupt (1);
+ cygheap->fdtab[filedes[0]]->set_r_no_interrupt (1);
return res;
}
@@ -82,7 +83,7 @@ dup (int fd)
int res;
SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," dup");
- res = dup2 (fd, fdtab.find_unused_handle ());
+ res = dup2 (fd, cygheap->fdtab.find_unused_handle ());
ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," dup");
@@ -92,5 +93,5 @@ dup (int fd)
int
dup2 (int oldfd, int newfd)
{
- return fdtab.dup2 (oldfd, newfd);
+ return cygheap->fdtab.dup2 (oldfd, newfd);
}