aboutsummaryrefslogtreecommitdiff
path: root/src/progman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/progman.c')
-rw-r--r--src/progman.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/progman.c b/src/progman.c
index 5085f16..570e31e 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -1119,7 +1119,7 @@ check_stopping (struct prog *prog, time_t now)
}
void
-progman_wake_sleeping ()
+progman_wake_sleeping (int onalrm)
{
struct prog *prog;
time_t now = time (NULL);
@@ -1139,6 +1139,10 @@ progman_wake_sleeping ()
prog->v.p.timestamp = 0;
prog_start (prog);
}
+ /* If there is no alarm pending, recompute next alarm.
+ This allows to cope with eventual clock inaccuracies. */
+ if (onalrm)
+ recompute_alarm = 1;
break;
case status_stopping:
@@ -1656,9 +1660,10 @@ progman_cleanup (int expect_term)
}
else if (WIFSIGNALED (status))
{
- retcode = STATUS_SIG_BIT | WTERMSIG (status);
+ retcode = WTERMSIG (status);
debug (1, (_("%s: terminated on signal %d"),
prog->tag, retcode));
+ retcode |= STATUS_SIG_BIT;
}
else
{
@@ -1710,7 +1715,7 @@ progman_cleanup (int expect_term)
if (!expect_term)
/* This will also recompute alarm settings, if necessary */
- progman_wake_sleeping ();
+ progman_wake_sleeping (0);
}
void

Return to:

Send suggestions and report system problems to the System administrator.