Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv30217

Modified Files:
        tmux.c 
Log Message:
Sync OpenBSD patchset 773:

Use an explicit event rather than event_once for the main event so it
can be removed when the client becomes ready.


Index: tmux.c
===================================================================
RCS file: /cvsroot/tmux/tmux/tmux.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- tmux.c      9 Oct 2010 14:29:32 -0000       1.216
+++ tmux.c      24 Oct 2010 00:31:57 -0000      1.217
@@ -60,6 +60,7 @@
 __dead void     shell_exec(const char *, const char *);
 
 struct imsgbuf *main_ibuf;
+struct event    main_event;
 
 void            main_signal(int, short, unused void *);
 void            main_callback(int, short, void *);
@@ -564,12 +565,14 @@
        events = EV_READ;
        if (main_ibuf->w.queued > 0)
                events |= EV_WRITE;
-       event_once(main_ibuf->fd, events, main_callback, shellcmd, NULL);
+       event_set(&main_event, main_ibuf->fd, events, main_callback, shellcmd);
+       event_add(&main_event, NULL);
 
        event_dispatch();
 
-       clear_signals(0);
+       event_del(&main_event);
 
+       clear_signals(0);
        client_main();  /* doesn't return */
 }
 
@@ -602,10 +605,12 @@
                        fatalx("msgbuf_write failed");
        }
 
+       event_del(&main_event);
        events = EV_READ;
        if (main_ibuf->w.queued > 0)
                events |= EV_WRITE;
-       event_once(main_ibuf->fd, events, main_callback, shellcmd, NULL);
+       event_set(&main_event, main_ibuf->fd, events, main_callback, shellcmd);
+       event_add(&main_event, NULL);
 }
 
 void


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to