summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2011-09-23 09:37:45 +0200
committerMichal Schmidt <mschmidt@redhat.com>2011-09-23 10:18:07 +0200
commit764e9b5f073e1d5216de150045ec85475835fe3c (patch)
tree0f7537c74e27811d5e68d7aadf8a4b123ef4f9e8 /src
parent1f8fef5a44e6ce711808665bca6eb43d604fe279 (diff)
manager: fix job mode for SIGRTMIN+1, +2
The test did not work as intended and always resulted in JOB_REPLACE.
Diffstat (limited to 'src')
-rw-r--r--src/manager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/manager.c b/src/manager.c
index 6311c1036..cf308ac4d 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -2233,8 +2233,9 @@ static int manager_process_signal_fd(Manager *m) {
if ((int) sfsi.ssi_signo >= SIGRTMIN+0 &&
(int) sfsi.ssi_signo < SIGRTMIN+(int) ELEMENTSOF(target_table)) {
- manager_start_target(m, target_table[sfsi.ssi_signo - SIGRTMIN],
- (sfsi.ssi_signo == 1 || sfsi.ssi_signo == 2) ? JOB_ISOLATE : JOB_REPLACE);
+ int idx = (int) sfsi.ssi_signo - SIGRTMIN;
+ manager_start_target(m, target_table[idx],
+ (idx == 1 || idx == 2) ? JOB_ISOLATE : JOB_REPLACE);
break;
}