summaryrefslogtreecommitdiff
path: root/winsup/cygwin/sigproc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index e3795a0a5c4..dafaad84faf 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -883,6 +883,7 @@ static HANDLE __stdcall
getsem (_pinfo *p, const char *str, int init, int max)
{
HANDLE h;
+ char sem_name[MAX_PATH];
if (p != NULL)
{
@@ -906,7 +907,7 @@ getsem (_pinfo *p, const char *str, int init, int max)
DWORD winpid = GetCurrentProcessId ();
h = CreateSemaphore (sec_user_nih (sa_buf), init, max,
- str = shared_name (str, winpid));
+ str = shared_name (sem_name, str, winpid));
p = myself;
if (!h)
{
@@ -917,7 +918,7 @@ getsem (_pinfo *p, const char *str, int init, int max)
else
{
h = OpenSemaphore (SEMAPHORE_ALL_ACCESS, FALSE,
- shared_name (str, p->dwProcessId));
+ shared_name (sem_name, str, p->dwProcessId));
if (!h)
{