diff options
author | Christopher Faylor <me@cgf.cx> | 2001-08-31 05:06:14 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-08-31 05:06:14 +0000 |
commit | 5835f2cf8dfb01b93c233bfb5e486482a545aded (patch) | |
tree | 1384eb71caa42c16db5ae0ad966088417bed66fa /winsup/cygwin/fhandler.h | |
parent | 33bc82476eb92308590d03407cb1597eca8b0079 (diff) | |
download | cygnal-5835f2cf8dfb01b93c233bfb5e486482a545aded.tar.gz cygnal-5835f2cf8dfb01b93c233bfb5e486482a545aded.tar.bz2 cygnal-5835f2cf8dfb01b93c233bfb5e486482a545aded.zip |
* cygwin.sc: New file -- linker script for building cygwin DLL.
* Makefile.in: Use linker script to control location of cygheap.
* cygheap.cc (buckets): Make static.
(init_cheap): Remove special iswinnt handling. Allocate cygheap at a fixed
location. Display more info when allocation fails.
(cygheap_fixup_in_child): Try harder to move cygheap to correct location.
Display more info when allocation fails.
* fhandler.h (fhandler_socket): Add macros for tracking socket shutdown state.
* net.cc (cygwin_shutdown): Set appropriate shutdown value for future use.
* select.cc (select_stuff::cleanup): New method.
(cygwin_select): Call cleanup explicitly to avoid a race.
(select_stuff:~select_stuff): Call cleanup chain via cleanup method.
(fhandler_socket::select_read): Set *_ready when shutdown has been called on
the socket.
(fhandler_socket::select_write): Ditto.
(fhandler_socket::select_except): Ditto.
* winsup.h: Move NO_COPY to "COMMON" section.
* autoload.cc (wsock_started): Avoid initializing NO_COPY value.
* sigproc.cc: Remove initialization from NO_COPY variables.
(sigproc_init): Initialize sig_loop_wait here, rather than via initialization.
(subproc_init): Initialize proc_loop_wait here, rather than via initialization.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index dd1df2978..6fe6ffff0 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -70,7 +70,8 @@ enum FH_NOEINTR = 0x01000000, /* Set if I/O should be uninterruptible. */ FH_FFIXUP = 0x02000000, /* Set if need to fixup after fork. */ FH_LOCAL = 0x04000000, /* File is unix domain socket */ - FH_FIFO = 0x08000000, /* File is FIFO */ + FH_SHUTRD = 0x08000000, /* Socket saw a SHUT_RD */ + FH_SHUTWR = 0x10000000, /* Socket saw a SHUT_WR */ FH_ISREMOTE = 0x10000000, /* File is on a remote drive */ FH_DCEXEC = 0x20000000, /* Don't care if this is executable */ FH_HASACLS = 0x40000000, /* True if fs of file has ACLS */ @@ -157,7 +158,7 @@ enum executable_states class fhandler_base { -private: +protected: DWORD status; public: int cb; @@ -398,6 +399,13 @@ public: ~fhandler_socket (); int get_socket () { return (int) get_handle(); } fhandler_socket * is_socket () { return this; } + + int saw_shutdown_read () const {return FHISSETF (SHUTRD);} + int saw_shutdown_write () const {return FHISSETF (SHUTWR);} + + void set_shutdown_read () {FHSETF (SHUTRD);} + void set_shutdown_write () {FHSETF (SHUTWR);} + int write (const void *ptr, size_t len); int read (void *ptr, size_t len); int ioctl (unsigned int cmd, void *); @@ -1066,6 +1074,7 @@ public: fd_set *exceptfds); int poll (fd_set *readfds, fd_set *writefds, fd_set *exceptfds); int wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, DWORD ms); + void cleanup (); }; int __stdcall set_console_state_for_spawn (); |