From d75735c3dd1720ea816e2178847b1c76dfcb7e9f Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 20 May 2012 07:40:33 +0200 Subject: Use global event to synchronise signaler creation on Windows So far, the event used for signaler creation was local to the session, so, in theory, processes in two different sessions could accidentally interconnect their signalers. Signed-off-by: Martin Sustrik --- src/signaler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/signaler.cpp b/src/signaler.cpp index 9b8f1d7..a9db3f2 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -95,8 +95,8 @@ static int make_fdpair (xs::fd_t *r_, xs::fd_t *w_) // This function has to be in a system-wide critical section so that // two instances of the library don't accidentally create signaler // crossing the process boundary. - // We'll use named event object to implement the critical section. - HANDLE sync = CreateEvent (&sa, FALSE, TRUE, "xs-signaler-port-sync"); + HANDLE sync = CreateEvent (&sa, FALSE, TRUE, + "Global\\xs-signaler-port-sync"); win_assert (sync != NULL); // Enter the critical section. -- cgit v1.2.3