From 6027d26d8b829833f716743acfb6881bb4236627 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 2 Feb 2004 20:33:09 +0000 Subject: [PATCH] Throughout, change name from set_inheritance to set_no_inheritance to better reflect input arguments of this function. * cygheap.h (CYGHEAPSIZE): Increase size of cygheap to something closer to the 21st century. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/cygheap.h | 2 +- winsup/cygwin/fhandler.cc | 4 ++-- winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_console.cc | 2 +- winsup/cygwin/fhandler_socket.cc | 6 +++--- winsup/cygwin/fhandler_tty.cc | 18 +++++++++--------- winsup/cygwin/fhandler_windows.cc | 2 +- winsup/cygwin/pipe.cc | 4 ++-- 9 files changed, 28 insertions(+), 20 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index af3852b5c..87d4ee565 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2004-02-02 Christopher Faylor + + Throughout, change name from set_inheritance to set_no_inheritance to + better reflect input arguments of this function. + + * cygheap.h (CYGHEAPSIZE): Increase size of cygheap to something closer + to the 21st century. + 2004-02-02 Corinna Vinschen * cygerrno.h (set_errno): Replace semicolon with comma in non-DEBUGGING diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h index f1c80e1af..fd649af06 100644 --- a/winsup/cygwin/cygheap.h +++ b/winsup/cygwin/cygheap.h @@ -272,7 +272,7 @@ struct init_cygheap void close_ctty (); }; -#define CYGHEAPSIZE (sizeof (init_cygheap) + (20000 * sizeof (fhandler_union)) + (5 * 65536)) +#define CYGHEAPSIZE (sizeof (init_cygheap) + (20000 * sizeof (fhandler_union)) + (64 * 1024 * 1024)) extern init_cygheap *cygheap; extern void *cygheap_max; diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 2b86d3c51..7b701d820 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1299,7 +1299,7 @@ fhandler_dev_null::dump (void) } void -fhandler_base::set_inheritance (HANDLE &h, int not_inheriting) +fhandler_base::set_no_inheritance (HANDLE &h, int not_inheriting) { HANDLE oh = h; /* Note that we could use SetHandleInformation here but it is not available @@ -1335,7 +1335,7 @@ void fhandler_base::set_close_on_exec (int val) { if (!get_nohandle ()) - set_inheritance (io_handle, val); + set_no_inheritance (io_handle, val); set_close_on_exec_flag (val); debug_printf ("set close_on_exec for %s to %d", get_name (), val); } diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 568e5237b..409695022 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -265,7 +265,7 @@ class fhandler_base __ino64_t get_namehash () { return namehash; } virtual void hclose (HANDLE h) {CloseHandle (h);} - virtual void set_inheritance (HANDLE &h, int not_inheriting); + virtual void set_no_inheritance (HANDLE &h, int not_inheriting); /* fixup fd possibly non-inherited handles after fork */ void fork_fixup (HANDLE parent, HANDLE &h, const char *name); diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index c1d8c9384..9355f5933 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1747,7 +1747,7 @@ void fhandler_console::set_close_on_exec (int val) { fhandler_base::set_close_on_exec (val); - set_inheritance (output_handle, val); + set_no_inheritance (output_handle, val); } void diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 22d322ff7..4285c87e5 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -200,7 +200,7 @@ fhandler_socket::create_secret_event (int* secret) debug_printf("create event %E"); else if (get_close_on_exec ()) /* Event allows inheritance, but handle will not be inherited */ - set_inheritance (secret_event, 1); + set_no_inheritance (secret_event, 1); return secret_event; } @@ -1300,9 +1300,9 @@ void fhandler_socket::set_close_on_exec (int val) { if (secret_event) - set_inheritance (secret_event, val); + set_no_inheritance (secret_event, val); if (!winsock2_active) /* < Winsock 2.0 */ - set_inheritance (get_handle (), val); + set_no_inheritance (get_handle (), val); set_close_on_exec_flag (val); debug_printf ("set close_on_exec for %s to %d", get_name (), val); } diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 97252734d..df074a44e 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1341,24 +1341,24 @@ fhandler_tty_common::set_close_on_exec (int val) else { if (output_done_event) - set_inheritance (output_done_event, val); + set_no_inheritance (output_done_event, val); if (ioctl_request_event) - set_inheritance (ioctl_request_event, val); + set_no_inheritance (ioctl_request_event, val); if (ioctl_done_event) - set_inheritance (ioctl_done_event, val); + set_no_inheritance (ioctl_done_event, val); if (inuse) - set_inheritance (inuse, val); - set_inheritance (output_mutex, val); - set_inheritance (input_mutex, val); - set_inheritance (input_available_event, val); - set_inheritance (output_handle, val); + set_no_inheritance (inuse, val); + set_no_inheritance (output_mutex, val); + set_no_inheritance (input_mutex, val); + set_no_inheritance (input_available_event, val); + set_no_inheritance (output_handle, val); #ifndef DEBUGGING fhandler_base::set_close_on_exec (val); #else /* FIXME: This is a duplication from fhandler_base::set_close_on_exec. It is here because we need to specify the "from_pty" stuff here or we'll get warnings from ForceCloseHandle when debugging. */ - set_inheritance (get_io_handle (), val); + set_no_inheritance (get_io_handle (), val); set_close_on_exec_flag (val); #endif } diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc index 5964052fa..a9c336413 100644 --- a/winsup/cygwin/fhandler_windows.cc +++ b/winsup/cygwin/fhandler_windows.cc @@ -133,7 +133,7 @@ fhandler_windows::set_close_on_exec (int val) fhandler_base::set_close_on_exec_flag (val); void *h = hWnd_; if (h) - set_inheritance (h, val); + set_no_inheritance (h, val); } void diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 82313c492..9f9909910 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -45,9 +45,9 @@ fhandler_pipe::set_close_on_exec (int val) { fhandler_base::set_close_on_exec (val); if (guard) - set_inheritance (guard, val); + set_no_inheritance (guard, val); if (writepipe_exists) - set_inheritance (writepipe_exists, val); + set_no_inheritance (writepipe_exists, val); } struct pipeargs