On Mon Feb 24 19:23:45 2014, bulk88 wrote: While writing a test for this, I discovered another bug or issue in Win32 PG kill. PG kill is supposed to return the number of processes "signaled" (is this a synonym for "killed" on Win32 platform?) per perldoc ------------------------------------------------ Sends a signal to a list of processes. Returns the number of processes successfully signaled (which is not necessarily the same as the number actually killed). ----------------------------------------------- My testing shows the retval in PP of PG kill in 5.12.2 is always 1. from win32_kill() ------------------------------------------- if (child >= 0) { if (my_kill(pid, sig)) {<<<<<<<<<<<<kill count lost DWORD exitcode = 0; if (GetExitCodeProcess(w32_child_handles[child], &exitcode) && exitcode != STILL_ACTIVE) { remove_dead_process(child); } return 0; } } -------------------------------------------- Perl_apply -------------------------------------------- if (val < 0) { val = -val; while (++mark <= sp) { I32 proc; if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark))) Perl_croak(aTHX_ "Can't kill a non-numeric process ID"); proc = SvIV(*mark); APPLY_TAINT_PROPER(); #ifdef HAS_KILLPG if (PerlProc_killpg(proc,val)) /* BSD */ <<<<<<<<<<<<<no way to return kill count, but posix killpg doesn't return process count, just error code #else if (PerlProc_kill(-proc,val)) /* SYSV */ #endif -------------------------- Is this something to be fixed or it is correct behavior that you can't tell how many processes were in the group from a kill on a PG? -- bulk88 ~ bulk88 at hotmail.com --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=121230Thread Previous | Thread Next