This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
src/winsup/cygwin ChangeLog cygwin.din dtable. ...
- From: corinna at cygwin dot com
- To: cygwin-cvs at cygwin dot com
- Date: 14 Jan 2010 18:46:02 -0000
- Subject: src/winsup/cygwin ChangeLog cygwin.din dtable. ...
CVSROOT: /cvs/src
Module name: src
Changes by: corinna@sourceware.org 2010-01-14 18:46:02
Modified files:
winsup/cygwin : ChangeLog cygwin.din dtable.cc dtable.h
fcntl.cc fhandler.cc fhandler.h
fhandler_console.cc fhandler_fifo.cc
fhandler_mailslot.cc fhandler_mem.cc
fhandler_registry.cc fhandler_tape.cc
fhandler_tty.cc pipe.cc posix_ipc.cc security.h
syscalls.cc
winsup/cygwin/include/cygwin: version.h
Log message:
* cygwin.din (dup3): Export.
(pipe2): Export.
* dtable.cc (dtable::dup_worker): Take additional flags parameter.
Handle O_CLOEXEC flag.
(dtable::dup3): Rename from dup2. Take additional flags parameter.
Check for valid flags. Drop check for newfd == oldfd.
* dtable.h (dtable::dup_worker): Add flags parameter.
(dtable::dup3): Rename from dup2.
* fcntl.cc (fcntl64): Add F_DUPFD_CLOEXEC case.
* fhandler.h (fhandler_mailslot::get_object_attr): Add flags parameter.
* fhandler.cc (fhandler_base::open): Use security attribute with
inheritance according to setting of O_CLOEXEC flag.
* fhandler_console.cc (fhandler_console::open): Ditto.
* fhandler_fifo.cc (sec_user_cloexec): New inline function to
create security attribute with inheritance according to setting of
O_CLOEXEC flag.
(fhandler_fifo::open): Call sec_user_cloexec to fetch security
attribute.
(fhandler_fifo::wait): Ditto.
* fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
* fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Take
additional flags parameter. Use security attribute with inheritance
according to setting of O_CLOEXEC flag.
(fhandler_mailslot::open): Call get_object_attr with flags parameter.
* fhandler_registry.cc (fhandler_registry::open): Call set_close_on_exec
on real handles to accommodate O_CLOEXEC flag.
* fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
* fhandler_tape.cc: Create mutex with inheritance according to setting
of O_CLOEXEC flag.
* pipe.cc: Replace usage of O_NOINHERIT with O_CLOEXEC.
(fhandler_pipe::init): Simplify setting close_on_exec flag.
(fhandler_pipe::open): Remove setting close_on_exec flag.
(fhandler_pipe::create): Use security attribute with inheritance
according to setting of O_CLOEXEC flag.
(pipe2): New exported function.
* posix_ipc.cc: Throughout, open backing files with O_CLOEXEC
flag to follow POSIX semantics.
* security.h (sec_none_cloexec): New define.
* syscalls.cc (dup): Add missing extern "C" qualifier. Accommodate
renaming of dtable::dup2 to dtable::dup3.
(dup2): Ditto. Check newfd == oldfd here.
(dup3): New function. Check newfd == oldfd here.
(open): Set close_on_exec flag according to O_CLOEXEC flag before
calling fhandler->open.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/ChangeLog.diff?cvsroot=src&r1=1.4766&r2=1.4767
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/cygwin.din.diff?cvsroot=src&r1=1.217&r2=1.218
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/dtable.cc.diff?cvsroot=src&r1=1.211&r2=1.212
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/dtable.h.diff?cvsroot=src&r1=1.51&r2=1.52
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fcntl.cc.diff?cvsroot=src&r1=1.31&r2=1.32
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler.cc.diff?cvsroot=src&r1=1.359&r2=1.360
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler.h.diff?cvsroot=src&r1=1.389&r2=1.390
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_console.cc.diff?cvsroot=src&r1=1.213&r2=1.214
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_fifo.cc.diff?cvsroot=src&r1=1.38&r2=1.39
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_mailslot.cc.diff?cvsroot=src&r1=1.11&r2=1.12
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_mem.cc.diff?cvsroot=src&r1=1.55&r2=1.56
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_registry.cc.diff?cvsroot=src&r1=1.58&r2=1.59
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_tape.cc.diff?cvsroot=src&r1=1.72&r2=1.73
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_tty.cc.diff?cvsroot=src&r1=1.192&r2=1.193
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/pipe.cc.diff?cvsroot=src&r1=1.120&r2=1.121
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/posix_ipc.cc.diff?cvsroot=src&r1=1.15&r2=1.16
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/security.h.diff?cvsroot=src&r1=1.108&r2=1.109
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/syscalls.cc.diff?cvsroot=src&r1=1.551&r2=1.552
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/include/cygwin/version.h.diff?cvsroot=src&r1=1.305&r2=1.306