diff options
author | Christopher Faylor <me@cgf.cx> | 2001-07-26 19:22:24 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-07-26 19:22:24 +0000 |
commit | 6b91b8d53be5b2333c3a8909d48a7a603aae4177 (patch) | |
tree | 060507f0ad7dac4b9a88696268df574996feb1dc /winsup/cygwin/fhandler.h | |
parent | c784c833aa9313a233a493cdb9e28f69fa7d360d (diff) | |
download | cygnal-6b91b8d53be5b2333c3a8909d48a7a603aae4177.tar.gz cygnal-6b91b8d53be5b2333c3a8909d48a7a603aae4177.tar.bz2 cygnal-6b91b8d53be5b2333c3a8909d48a7a603aae4177.zip |
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.h | 8 |
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); } |