ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtd.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtd.C (file contents):
Revision 1.37 by root, Sun Nov 18 00:17:20 2007 UTC vs.
Revision 1.40 by root, Tue Dec 4 14:50:43 2007 UTC

46 void read_cb (ev::io &w, int revents); ev::io read_ev; 46 void read_cb (ev::io &w, int revents); ev::io read_ev;
47 void log_msg (const char *msg); 47 void log_msg (const char *msg);
48 int getfd (int remote_fd); 48 int getfd (int remote_fd);
49 49
50 server (int fd) 50 server (int fd)
51 : read_ev (this, &server::read_cb), 51 : read_ev (this, &server::read_cb)
52 log_cb (this, &server::log_msg),
53 getfd_cb (this, &server::getfd)
54 { 52 {
53 callback_set (log_cb , this, server, log_msg);
54 callback_set (getfd_cb, this, server, getfd);
55 this->fd = fd; 55 this->fd = fd;
56 fcntl (fd, F_SETFD, FD_CLOEXEC); 56 fcntl (fd, F_SETFD, FD_CLOEXEC);
57 fcntl (fd, F_SETFL, 0); 57 fcntl (fd, F_SETFL, 0);
58 read_ev.start (fd, ev::READ); 58 read_ev.start (fd, ev::READ);
59 } 59 }
271 rxvt_log ("unable to fork daemon, aborting.\n"); 271 rxvt_log ("unable to fork daemon, aborting.\n");
272 return EXIT_FAILURE; 272 return EXIT_FAILURE;
273 } 273 }
274 else if (pid > 0) 274 else if (pid > 0)
275 _exit (EXIT_SUCCESS); 275 _exit (EXIT_SUCCESS);
276 }
277 276
277 ev_default_fork ();
278 }
279
278 ev::ev_loop (0); 280 ev_loop (0);
279 281
280 return EXIT_SUCCESS; 282 return EXIT_SUCCESS;
281} 283}
282 284

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines