… | |
… | |
246 | rxvt_log ("%s: unknown option '%s', aborting.\n", argv [0], argv [i]); |
246 | rxvt_log ("%s: unknown option '%s', aborting.\n", argv [0], argv [i]); |
247 | return EXIT_FAILURE; |
247 | return EXIT_FAILURE; |
248 | } |
248 | } |
249 | } |
249 | } |
250 | |
250 | |
251 | chdir ("/"); |
251 | // optionally open display and never release it. |
252 | |
|
|
253 | if (opt_opendisplay) |
252 | if (opt_opendisplay) |
254 | displays.get (getenv ("DISPLAY")); // open display and never release it |
253 | if (const char *dpy = getenv ("DISPLAY")) |
|
|
254 | displays.get (dpy ? dpy : ":0"); // move string logic into rxvt_display maybe? |
255 | |
255 | |
256 | char *sockname = rxvt_connection::unix_sockname (); |
256 | char *sockname = rxvt_connection::unix_sockname (); |
257 | unix_listener l (sockname); |
257 | unix_listener l (sockname); |
|
|
258 | |
|
|
259 | chdir ("/"); |
258 | |
260 | |
259 | if (!opt_quiet) |
261 | if (!opt_quiet) |
260 | { |
262 | { |
261 | printf ("rxvt-unicode daemon listening on %s.\n", sockname); |
263 | printf ("rxvt-unicode daemon listening on %s.\n", sockname); |
262 | fflush (stdout); |
264 | fflush (stdout); |