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:
authorChristopher Faylor <me@cgf.cx>2000-03-15 07:49:36 +0300
committerChristopher Faylor <me@cgf.cx>2000-03-15 07:49:36 +0300
commit332600d80cdfcf46ce36c9f5c77b452d8636fa7f (patch)
tree31ba7287033df0ea28d03a345d08840662a1b798 /winsup/cygwin/dtable.cc
parent31b3dbe174d47b96ee7a8b08c7e67b50505eb79e (diff)
Pipe changes throughout suggested by Eric Fifer <EFifer@sanwaint.com>
* debug.cc (threadname_init): Pass name of lock as arg 2 of new_muto. * malloc.cc (malloc_init): Ditto. * sigproc.cc (sigproc_init): Ditto. * exceptions.cc (events_init): Ditto. (call_handler): Eliminate special case for hExeced. Report locked thread in debugging output. * fhandler.cc (fhandker_pipe::fhandler_pipe): Propagate device type to base class. * fhandler.h (fhandler_pipe): Ditto. * hinfo.cc (hinfo::build_fhandler): Pass specific type of pipe to constructor. * spawn.cc (spawn_guts): Eliminate dependency on signal when waiting for subprocess. * strace.cc: Remove obsolete #ifdef. * sync.cc (muto::muto): Save the name of the muto. (muto:~muto): Also release the muto. * sync.h: Add a muto name field. * select.cc (peek_pipe): Avoid doing a PeekNamedPipe on the write end of a pipe.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 385553a65..f3dd1fb94 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -233,7 +233,8 @@ hinfo::build_fhandler (int fd, DWORD dev, const char *name, int unit)
fhandler_base *fh;
void *buf = calloc (1, sizeof (fhandler_union) + 100);
- switch (dev & FH_DEVMASK)
+ dev &= FH_DEVMASK;
+ switch (dev)
{
case FH_TTYM:
fh = new (buf) fhandler_tty_master (name, unit);
@@ -256,12 +257,12 @@ hinfo::build_fhandler (int fd, DWORD dev, const char *name, int unit)
fh = new (buf) fhandler_windows (name);
break;
case FH_SERIAL:
- fh = new (buf) fhandler_serial (name, FH_SERIAL, unit);
+ fh = new (buf) fhandler_serial (name, dev, unit);
break;
case FH_PIPE:
case FH_PIPER:
case FH_PIPEW:
- fh = new (buf) fhandler_pipe (name);
+ fh = new (buf) fhandler_pipe (name, dev);
break;
case FH_SOCKET:
fh = new (buf) fhandler_socket (name);