summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-04-10 12:20:36 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-04-10 12:20:36 +0000
commit5c56a6a1f6d6808046a0821966cd9167e52d32a6 (patch)
tree56a0fddece912d199362ff90e00faa3636993326
parent6e7cf023b251a2dcaa9c46d2e02ec1f052d7df29 (diff)
Set EV_WRITE for jobs or run/if-shell jobs can hang. From Chris Johnsen.
-rw-r--r--usr.bin/tmux/job.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/job.c b/usr.bin/tmux/job.c
index 749e9a698e5..edd0a226e50 100644
--- a/usr.bin/tmux/job.c
+++ b/usr.bin/tmux/job.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: job.c,v 1.29 2013/03/25 11:43:01 nicm Exp $ */
+/* $OpenBSD: job.c,v 1.30 2013/04/10 12:20:35 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -109,7 +109,7 @@ job_run(const char *cmd, struct session *s,
job->event = bufferevent_new(job->fd, NULL, job_write_callback,
job_callback, job);
- bufferevent_enable(job->event, EV_READ);
+ bufferevent_enable(job->event, EV_READ|EV_WRITE);
log_debug("run job %p: %s, pid %ld", job, job->cmd, (long) job->pid);
return (job);