This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix killpg on Win32, to meet posix expectations for killpg
authorDaniel Dragan <bulk88@hotmail.com>
Thu, 27 Mar 2014 07:37:03 +0000 (03:37 -0400)
committerSteve Hay <steve.m.hay@googlemail.com>
Thu, 27 Mar 2014 11:01:56 +0000 (11:01 +0000)
commit721b26746b834f5757da998a7d1918547cf27ef3
tree8745d8b05d8497fcec5ab1e61c55365d9bf3fe87
parent5ed061ffb1e0dc3e88d2395a727b41f73002750c
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]
pod/perldelta.pod
win32/win32.c
win32/win32.h
win32/win32iop.h