diff mbox

[PULL,v1,2/5] io: increment counter when killing off subcommand

Message ID 1453291293-2821-3-git-send-email-berrange@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel P. Berrangé Jan. 20, 2016, 12:01 p.m. UTC
When killing the subcommand, it is intended to first send
SIGTERM, then SIGKILL and only report an error if it still
doesn't die after SIGKILL. The 'step' counter was not
being incremented though, so the code never got past the
SIGTERM stage.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 io/channel-command.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/io/channel-command.c b/io/channel-command.c
index 598fdab..a220fe8 100644
--- a/io/channel-command.c
+++ b/io/channel-command.c
@@ -179,6 +179,7 @@  static int qio_channel_command_abort(QIOChannelCommand *ioc,
                        (unsigned long long)ioc->pid);
             return -1;
         }
+        step++;
         usleep(10 * 1000);
         goto rewait;
     }