summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSon Dinh <dinhs@objectcomputing.com>2022-04-06 13:00:30 -0500
committerSon Dinh <dinhs@objectcomputing.com>2022-04-06 13:00:30 -0500
commit7846f2db1fe1f781cf9573c5392fe69131be71c7 (patch)
tree83df5dcf1f37fb4197478148730c276c79912728
parent146a30e97879d52584d681754354e3e1bc9df02b (diff)
downloadATCD-7846f2db1fe1f781cf9573c5392fe69131be71c7.tar.gz
Update doc and add argument to SpawnWaitKill
-rw-r--r--ACE/bin/PerlACE/Process_Unix.pm20
1 files changed, 13 insertions, 7 deletions
diff --git a/ACE/bin/PerlACE/Process_Unix.pm b/ACE/bin/PerlACE/Process_Unix.pm
index a585aa808e3..3ca197eadcc 100644
--- a/ACE/bin/PerlACE/Process_Unix.pm
+++ b/ACE/bin/PerlACE/Process_Unix.pm
@@ -615,16 +615,17 @@ sub WaitKill ($;$)
# Do a Spawn and immediately WaitKill
-sub SpawnWaitKill ($)
+sub SpawnWaitKill ($;$)
{
my $self = shift;
my $timeout = shift;
+ my $opts = shift;
if ($self->Spawn () == -1) {
return -1;
}
- return $self->WaitKill ($timeout);
+ return $self->WaitKill ($timeout, $opts);
}
sub TerminateWaitKill ($)
@@ -637,14 +638,19 @@ sub TerminateWaitKill ($)
kill ('TERM', $self->{PROCESS});
}
- return $self->WaitKill ($timeout);
+ return $self->WaitKill ($timeout, {self_crash => 1});
}
# Really only for internal use.
-# The second optional argument indicates whether the corresponding process
-# may deliberately send a signal to itself or not. It also contains output
-# data indicating whether there was a core dump and/or the signal nubmer
-# the process has died from, if any.
+# The second optional argument is a hash reference with the following keys.
+# 1. "self_crash" indicates if the process may receive a signal intentionally.
+# In that case, a signal may originate from the process, e.g., by calling abort(),
+# or from an associated Perl script, e.g., by calling kill. If "self_crash" is
+# missing, it has the same meaning as if "self_crash" is evaluated to false.
+# A signal intentionally received can be either KILL, TERM, or ABRT. Any other
+# signal indicates there was an actual error.
+# 2. "signal_ref" is a scalar reference that will hold the signal number, if any.
+# 3. "dump_ref" is a scalar reference that indicates if there was a core dump.
sub check_return_value ($)
{
my $self = shift;