From 987f90d929b29d65c42e8185d3f9d195af93d29e Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 27 Aug 2013 10:58:41 +0200 Subject: [PATCH] niceload: When CTRL-C'ing niceload -p, the controlled PID should continue and not be killed. --- src/niceload | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/niceload b/src/niceload index 4830e0eb..2a48db11 100755 --- a/src/niceload +++ b/src/niceload @@ -397,8 +397,14 @@ sub kill_child_TSTP { sub kill_child_INT { my $self = $Global::process; - ::debug("SIGINT received. Killing $self->{'pid'} Exit\n"); - kill INT => $self->pgrp(); + ::debug("SIGINT received.\n"); + if(not @opt::pid) { + ::debug("Killing $self->{'pid'} Exit\n"); + kill INT => $self->pgrp(); + } else { + ::debug("Continue pids $self->{'pid'} Exit\n"); + kill CONT => $self->pgrp(); + } exit; }