Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs of kill_kill() return value #101

Open
toddr opened this issue Mar 26, 2018 · 1 comment
Open

docs of kill_kill() return value #101

toddr opened this issue Mar 26, 2018 · 1 comment
Labels
Docs A Documentation fix

Comments

@toddr
Copy link
Member

toddr commented Mar 26, 2018

https://rt.cpan.org/Public/Bug/Display.html?id=123274

Date: | Sat, 14 Oct 2017 12:37:20 +1100
To: | bug-IPC-Run [...] rt.cpan.org
From: | Kevin Ryde <user42_kevin [...] yahoo.com.au>

The docs of IPC::Run 0.96 say kill_kill()

Returns a 1 if the "TERM" was sufficient, or a 0 if "KILL" was
required.

but running the code it is undef and 1 respectively. Sample program
below. The first TERM suffices, the second ignores TERM and needs KILL.

use strict;
use IPC::Run;
foreach my $sh ('sleep 10',
                'trap "" TERM; sleep 10') {
  my $ipc = IPC::Run::start(['sh','-c',$sh]);
  sleep 1;
  my $ret = $ipc->kill_kill(grace=>1);
  print defined $ret ? $ret : "[undef]", "\n";
}
@toddr
Copy link
Member Author

toddr commented Mar 26, 2018

This seems to be a request for a documentation fix. I assume we need to clarify that this is a truthy response rather than 0/1.

If this is not the case, let me know.

@toddr toddr added the Docs A Documentation fix label Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs A Documentation fix
Projects
None yet
Development

No branches or pull requests

1 participant