summaryrefslogtreecommitdiff
path: root/win32/win32iop.h
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2014-03-27 03:37:03 -0400
committerSteve Hay <steve.m.hay@googlemail.com>2014-03-27 11:01:56 +0000
commit721b26746b834f5757da998a7d1918547cf27ef3 (patch)
tree8745d8b05d8497fcec5ab1e61c55365d9bf3fe87 /win32/win32iop.h
parent5ed061ffb1e0dc3e88d2395a727b41f73002750c (diff)
downloadperl-721b26746b834f5757da998a7d1918547cf27ef3.tar.gz
fix killpg on Win32, to meet posix expectations for killpg
On Win32 Perls built without PERL_IMPLICIT_SYS, killpg from win32.c was directly called by Perl_apply, yet killpg's return value had Win32 behavior, not POSIX behavior. Modify killpg token to have same meaning as PerlProcKillpg/PerlProc_killpg has on PERL_IMPLICIT_SYS builds. Use a macro rather than create a win32_killpg C function since win32_killpg would be nothing but a call to win32_kill anyways. win32_kill contains the Win32 to POSIX semantics conversion code. Rename old killpg to my_killpg since it has no use outside of win32.c. The psuedo-PID code in win32_kill also played a factor in not writing a separate win32_killpg that calls my_killpg. This fix is tested by kill0.t passing on no-PERL_IMPLICIT_SYS builds. [perl #121230]
Diffstat (limited to 'win32/win32iop.h')
-rw-r--r--win32/win32iop.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/win32/win32iop.h b/win32/win32iop.h
index 11d4219fc2..246375faa3 100644
--- a/win32/win32iop.h
+++ b/win32/win32iop.h
@@ -448,6 +448,11 @@ END_EXTERN_C
# undef kill
#endif
#define kill win32_kill
+#ifdef UNDER_CE
+# undef killpg
+#endif
+#define killpg(pid, sig) win32_kill(pid, -(sig))
+
#ifdef UNDER_CE
# undef opendir