newlib/winsup
Christopher Faylor ca35d41cec Implement fhandler reference counting.
* cygheap.h
(cygheap_fdmanip::release): Make virtual.
(cygheap_fdnew::~cygheap_fdnew): New destructor increments reference count when
fd has been allocated.
(cygheap_fdget::fh): New (old?) field.
(cygheap_fdget::cygheap_fdget): Increment reference count when we've found an
active fd.  Set fh appropriately.
(cygheap_fdget::~cygheap_fdget): Decrement reference count when appropriate.
Delete fh if reference count goes to zero.
(cygheap_fdget::release): New function.  Do more bookkeping on release.
* dtable.cc (dtable::release): Change from void to boolean return.  Only delete
the fhandler when its reference count is <= 0 (this should be a fairly unusual
case).  Return true if fhandler has been deleted.
(cygwin_attach_handle_to_fd): Increment reference count when fh is assigned.
(dtable::init_std_file_from_handle): Ditto.
* dtable.h (dtable::release): Change return to boolean.
* fhandler.cc (fhandler_base::fhandler_base): Set new isclosed flag to false.
Set _refcnt to zero.
(fhandler_base::close): Simplify paranoid debugging output.  Set new isclosed()
flag.
(fhandler_base_overlapped::wait_overlapped): Use isclosed() flag to avoid
querying the exception handle.
* fhandler.h (fhandler_base::_refcnt): New field.
(fhandler_base::refcnt): New function.
(fhandler_base::isclosed): Implement.
(fhandler_base::fhandler_base): Set isclosed to false.
* syscalls.cc: Remove space after function before parentheses for several
strace printfs.
(dup): Add standard strace "leaver" code.
(dup2): Ditto.
(dup3): Ditto.
(remove): Ditto.
(getpid): Ditto.
(getppid): Ditto.
(lseek64): Fix strace debugging to correctly use %R.
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Avoid sending signals to
other processes if we're debugging since it can cause a deadlock with the
calling debugger.
* exceptions.cc (_cygtls::call_signal_handler): Add debugging-only strace
output.
2011-12-17 00:03:31 +00:00
..
cygserver * cygserver.cc (print_usage): Align output to utilities in utils 2011-10-10 15:48:54 +00:00
cygwin Implement fhandler reference counting. 2011-12-17 00:03:31 +00:00
doc * faq-using.xml: Remove obsolete entry about the standard console window. 2011-12-13 03:54:59 +00:00
lsaauth * Makefile.in: Don't override CC. 2011-05-10 10:06:51 +00:00
mingw 2011-11-30 Ozkan Sezer <sezero@users.sourceforge.net> 2011-12-01 00:24:35 +00:00
testsuite
utils * Makefile.in (cygpath.exe): Add -luserenv to ALL_LDFLAGS. 2011-12-02 16:15:26 +00:00
w32api Factor common code from subdirectory makefiles into Makefile.comm.in 2011-12-13 20:46:53 +00:00
acinclude.m4
aclocal.m4
ChangeLog
configure
configure.in
COPYING
CYGWIN_LICENSE
Makefile.common
Makefile.in
README

THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Cygwin documentation is available on the net at http://cygwin.com
You might especially be interested in

http://cygwin.com/faq/faq.programming.html#faq.programming.building-cygwin