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.23 by root, Wed Jan 11 00:59:58 2006 UTC vs.
Revision 1.25 by root, Tue Jan 17 15:43:49 2006 UTC

71}; 71};
72 72
73unix_listener::unix_listener (const char *sockname) 73unix_listener::unix_listener (const char *sockname)
74: accept_ev (this, &unix_listener::accept_cb) 74: accept_ev (this, &unix_listener::accept_cb)
75{ 75{
76 if ((fd = socket (PF_UNIX, SOCK_STREAM, 0)) < 0) 76 if ((fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
77 { 77 {
78 perror ("unable to create listening socket"); 78 perror ("unable to create listening socket");
79 exit (EXIT_FAILURE); 79 exit (EXIT_FAILURE);
80 } 80 }
81 81
118 } 118 }
119} 119}
120 120
121int server::getfd (int remote_fd) 121int server::getfd (int remote_fd)
122{ 122{
123#if ENABLE_FRILLS && HAVE_UNIX_FDPASS
124 send ("GETFD"); 123 send ("GETFD");
125 send (remote_fd); 124 send (remote_fd);
126 return rxvt_recv_fd (fd); 125 return rxvt_recv_fd (fd);
127#else
128 return -1;
129#endif
130} 126}
131 127
132void server::log_msg (const char *msg) 128void server::log_msg (const char *msg)
133{ 129{
134 send ("MSG"), send (msg); 130 send ("MSG"), send (msg);
226int opt_fork, opt_opendisplay, opt_quiet; 222int opt_fork, opt_opendisplay, opt_quiet;
227 223
228int 224int
229main (int argc, const char *const *argv) 225main (int argc, const char *const *argv)
230{ 226{
227 rxvt_init ();
228
231 for (int i = 1; i < argc; i++) 229 for (int i = 1; i < argc; i++)
232 { 230 {
233 if (!strcmp (argv [i], "-f") || !strcmp (argv [i], "--fork")) 231 if (!strcmp (argv [i], "-f") || !strcmp (argv [i], "--fork"))
234 opt_fork = 1; 232 opt_fork = 1;
235 else if (!strcmp (argv [i], "-o") || !strcmp (argv [i], "--opendisplay")) 233 else if (!strcmp (argv [i], "-o") || !strcmp (argv [i], "--opendisplay"))
241 rxvt_log ("%s: unknown option '%s', aborting.\n", argv [0], argv [i]); 239 rxvt_log ("%s: unknown option '%s', aborting.\n", argv [0], argv [i]);
242 return EXIT_FAILURE; 240 return EXIT_FAILURE;
243 } 241 }
244 } 242 }
245 243
246 rxvt_init ();
247
248 chdir ("/"); 244 chdir ("/");
249 245
250 if (opt_opendisplay) 246 if (opt_opendisplay)
251 displays.get (getenv ("DISPLAY")); // open display and never release it 247 displays.get (getenv ("DISPLAY")); // open display and never release it
252 248

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines