… | |
… | |
100 | fcntl (fd, F_SETFL, O_NONBLOCK); |
100 | fcntl (fd, F_SETFL, O_NONBLOCK); |
101 | |
101 | |
102 | sa.sun_family = AF_UNIX; |
102 | sa.sun_family = AF_UNIX; |
103 | strcpy (sa.sun_path, sockname); |
103 | strcpy (sa.sun_path, sockname); |
104 | |
104 | |
105 | unlink (rxvt_connection::unix_sockname ()); |
105 | unlink (sockname); |
106 | |
106 | |
107 | mode_t omask = umask (0077); |
107 | mode_t omask = umask (0077); |
108 | |
108 | |
109 | if (bind (fd, (sockaddr *)&sa, sizeof (sa))) |
109 | if (bind (fd, (sockaddr *)&sa, sizeof (sa))) |
110 | { |
110 | { |
… | |
… | |
227 | int |
227 | int |
228 | main (int argc, const char *const *argv) |
228 | main (int argc, const char *const *argv) |
229 | { |
229 | { |
230 | ptytty::init (); |
230 | ptytty::init (); |
231 | |
231 | |
232 | int opt_fork = 0, opt_opendisplay = 0, opt_quiet = 0; |
232 | static char opt_fork, opt_opendisplay, opt_quiet; |
233 | #if ENABLE_MLOCK |
233 | #if ENABLE_MLOCK |
234 | int opt_lock = 0; |
234 | static char opt_lock; |
235 | #endif |
235 | #endif |
236 | |
236 | |
237 | for (int i = 1; i < argc; i++) |
237 | for (int i = 1; i < argc; i++) |
238 | { |
238 | { |
239 | if (!strcmp (argv [i], "-f") || !strcmp (argv [i], "--fork")) |
239 | if (!strcmp (argv [i], "-f") || !strcmp (argv [i], "--fork")) |