diff options
Diffstat (limited to 'usr.bin/tmux/job.c')
-rw-r--r-- | usr.bin/tmux/job.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/job.c b/usr.bin/tmux/job.c index 30da9120822..0c6f4433c4a 100644 --- a/usr.bin/tmux/job.c +++ b/usr.bin/tmux/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.13 2009/11/26 21:37:13 nicm Exp $ */ +/* $OpenBSD: job.c,v 1.14 2009/12/03 22:50:10 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -80,7 +80,7 @@ job_add(struct jobs *jobs, int flags, struct client *c, const char *cmd, void (*callbackfn)(struct job *), void (*freefn)(void *), void *data) { struct job *job; - + job = xmalloc(sizeof *job); job->cmd = xstrdup(cmd); job->pid = -1; @@ -183,7 +183,7 @@ job_run(struct job *job) if (job->event != NULL) bufferevent_free(job->event); - job->event = + job->event = bufferevent_new(job->fd, NULL, NULL, job_callback, job); bufferevent_enable(job->event, EV_READ); @@ -216,7 +216,7 @@ job_died(struct job *job, int status) { job->status = status; job->pid = -1; - + if (job->fd == -1) { if (job->callbackfn != NULL) job->callbackfn(job); |