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>2001-07-26 23:22:24 +0400
committerChristopher Faylor <me@cgf.cx>2001-07-26 23:22:24 +0400
commit6b91b8d53be5b2333c3a8909d48a7a603aae4177 (patch)
tree060507f0ad7dac4b9a88696268df574996feb1dc /winsup/cygwin/fhandler.h
parentc784c833aa9313a233a493cdb9e28f69fa7d360d (diff)
Throughout, reorganize header file inclusion to put security.h prior to
fhandler.h. * fhandler.h (fhandler_base::get_inheritance): New method. * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper close-on-exec inheritance when creating. (fhandler_socket::check_peer_secret_event): Create handle as non-inheritable.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index ca95bc03f..57a55e524 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -221,6 +221,14 @@ public:
int get_close_on_exec () { return FHISSETF (CLOEXEC); }
int set_close_on_exec_flag (int b) { return FHCONDSETF (b, CLOEXEC); }
+ LPSECURITY_ATTRIBUTES get_inheritance (bool all = 0)
+ {
+ if (all)
+ return get_close_on_exec () ? &sec_all_nih : &sec_all;
+ else
+ return get_close_on_exec () ? &sec_none_nih : &sec_none;
+ }
+
void set_check_win95_lseek_bug (int b = 1) { FHCONDSETF (b, W95LSBUG); }
int get_check_win95_lseek_bug () { return FHISSETF (W95LSBUG); }