Commit a81bad13 by Richard Weinberger Committed by Stéphane Graber

init: unnest interrupt_handler

There is no need to use nested functions voodoo. Signed-off-by: 's avatarRichard Weinberger <richard@nod.at> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 2c7d90ac
...@@ -49,15 +49,14 @@ static struct option options[] = { ...@@ -49,15 +49,14 @@ static struct option options[] = {
static int was_interrupted = 0; static int was_interrupted = 0;
int main(int argc, char *argv[]) static void interrupt_handler(int sig)
{ {
if (!was_interrupted)
was_interrupted = sig;
}
void interrupt_handler(int sig) int main(int argc, char *argv[])
{ {
if (!was_interrupted)
was_interrupted = sig;
}
pid_t pid; pid_t pid;
int nbargs = 0; int nbargs = 0;
int err = -1; int err = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment