From 8a92f14092aa538546d319620c341ac058b833a6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 30 Mar 2012 11:29:57 +0000 Subject: [PATCH] * posix.sgml (std-notes): Change description of flock restrictions. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/posix.sgml | 9 +++++---- winsup/cygwin/release/1.7.12 | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1c632eb58..84110b2e2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2012-03-30 Corinna Vinschen + + * posix.sgml (std-notes): Change description of flock restrictions. + 2012-03-30 Corinna Vinschen * devices.h (DEV_TTY_MAJOR): Define, use throughout where appropriate. diff --git a/winsup/cygwin/posix.sgml b/winsup/cygwin/posix.sgml index 5bb27d7c7..5e5df463b 100644 --- a/winsup/cygwin/posix.sgml +++ b/winsup/cygwin/posix.sgml @@ -1457,10 +1457,11 @@ CLOCK_REALTIME and CLOCK_MONOTONIC. clock_setres, clock_settime, and timer_create currently support only CLOCK_REALTIME. -BSD file locks created via flock are not -propagated to the parent process and sibling processes. The locks are -only valid in the creating process and subsequently started child processes -sharing the same file descriptor. +BSD file locks created via flock are only +propagated to the direct parent process, not to grand parents or sibling +processes. The locks are only valid in the creating process, its parent, +and subsequently started child processes sharing the same file descriptor. + fpclassify, isfinite, isgreater, isgreaterequal, diff --git a/winsup/cygwin/release/1.7.12 b/winsup/cygwin/release/1.7.12 index f81cbf1bb..4072ad31e 100644 --- a/winsup/cygwin/release/1.7.12 +++ b/winsup/cygwin/release/1.7.12 @@ -5,3 +5,17 @@ What's new: existing POSIX devices. - Add virtual /proc/PID/mountinfo file. + +- flock now additionaly supports the following scenario, which requires + to propagate locks to the parent process: + + ( + flock -n 9 || exit 1 + # ... commands executed under lock ... + } 9>/var/lock/mylockfile + + Only propagation to the direct parent process is supported so far, + not to grand parents or sibling processes. + +- Add a "detect_bloda" setting for the CYGWIN environment variable to help + finding potential BLODAs.