diff options
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: job.c,v 1.9 2009-11-02 21:38:26 tcunha Exp $ */ +/* $Id: job.c,v 1.10 2009-11-08 22:40:36 tcunha Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -86,6 +86,7 @@ job_add(struct jobs *jobs, int flags, struct client *c, const char *cmd, job->fd = -1; job->out = buffer_create(BUFSIZ); + memset(&job->event, 0, sizeof job->event); job->callbackfn = callbackfn; job->freefn = freefn; @@ -125,6 +126,7 @@ job_free(struct job *job) close(job->fd); if (job->out != NULL) buffer_destroy(job->out); + event_del(&job->event); xfree(job); } @@ -146,7 +148,7 @@ job_run(struct job *job) case -1: return (-1); case 0: /* child */ - sigreset(); + server_signal_clear(); /* XXX environ? */ if (dup2(out[1], STDOUT_FILENO) == -1) |