[win32] semctl tweak
Graham Barr [Sun, 31 May 1998 16:27:33 +0000 (11:27 -0500)]
Message-Id: <199805312127.QAA06750@gbarr.connect.net>
Subject: Not OK: perl 5.00466 on i586-linux-thread 2.0.31

p4raw-id: //depot/win32/perl@1068

doio.c

diff --git a/doio.c b/doio.c
index 365c72f..9d841a1 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1435,6 +1435,8 @@ do_ipcctl(I32 optype, SV **mark, SV **sp)
 
             semun.buf = &semds;
            getinfo = (cmd == GETALL);
+           if (Semctl(id, 0, IPC_STAT, semun) == -1)
+               return -1;
            infosize = semds.sem_nsems * sizeof(short);
                /* "short" is technically wrong but much more portable
                   than guessing about u_?short(_t)? */