From 721b26746b834f5757da998a7d1918547cf27ef3 Mon Sep 17 00:00:00 2001 From: Daniel Dragan Date: Thu, 27 Mar 2014 03:37:03 -0400 Subject: 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] --- win32/win32iop.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'win32/win32iop.h') 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 -- cgit v1.2.1