| 82 char *opt_rcfile_arg = NULL; |
82 char *opt_rcfile_arg = NULL; |
| 83 int opt_debug = 0; |
83 int opt_debug = 0; |
| 84 |
84 |
| 85 void BuddyTickerCreateWindow(void); |
85 void BuddyTickerCreateWindow(void); |
| 86 |
86 |
| |
87 #if HAVE_SIGNAL_H |
| |
88 /* |
| |
89 * Lists of signals we wish to catch and those we wish to ignore. |
| |
90 * Each list terminated with -1 |
| |
91 */ |
| |
92 static int catch_sig_list[] = { |
| |
93 SIGSEGV, |
| |
94 SIGHUP, |
| |
95 SIGINT, |
| |
96 SIGTERM, |
| |
97 SIGQUIT, |
| |
98 SIGCHLD, |
| |
99 -1 |
| |
100 }; |
| |
101 |
| |
102 static int ignore_sig_list[] = { |
| |
103 SIGPIPE, |
| |
104 -1 |
| |
105 }; |
| |
106 #endif |
| |
107 |
| |
108 |
| 87 void cancel_logon(void) |
109 void cancel_logon(void) |
| 88 { |
110 { |
| 89 #ifdef USE_APPLET |
111 #ifdef USE_APPLET |
| 90 applet_buddy_show = FALSE; |
112 applet_buddy_show = FALSE; |
| 91 if (mainwindow) |
113 if (mainwindow) |
| 525 /* FUCKING GET ME A TOWEL! */ |
550 /* FUCKING GET ME A TOWEL! */ |
| 526 int main(int argc, char *argv[]) |
551 int main(int argc, char *argv[]) |
| 527 { |
552 { |
| 528 int opt_acct = 0, opt_help = 0, opt_version = 0, opt_login = 0, do_login_ret = -1; |
553 int opt_acct = 0, opt_help = 0, opt_version = 0, opt_login = 0, do_login_ret = -1; |
| 529 char *opt_user_arg = NULL, *opt_login_arg = NULL; |
554 char *opt_user_arg = NULL, *opt_login_arg = NULL; |
| |
555 #if HAVE_SIGNAL_H |
| |
556 int sig_indx; /* for setting up signal catching */ |
| |
557 void (*prev_sig_disp)(); |
| |
558 #endif |
| 530 #ifndef USE_APPLET |
559 #ifndef USE_APPLET |
| 531 int opt, opt_user = 0; |
560 int opt, opt_user = 0; |
| 532 int i; |
561 int i; |
| 533 |
562 |
| 534 #ifdef USE_GNOME |
563 #ifdef USE_GNOME |
| 571 textdomain(PACKAGE); |
600 textdomain(PACKAGE); |
| 572 #endif |
601 #endif |
| 573 |
602 |
| 574 #if HAVE_SIGNAL_H |
603 #if HAVE_SIGNAL_H |
| 575 /* Let's not violate any PLA's!!!! */ |
604 /* Let's not violate any PLA's!!!! */ |
| 576 signal(SIGSEGV, sighandler); |
605 /* jseymour: whatever the fsck that means */ |
| 577 signal(SIGHUP, sighandler); |
606 for(sig_indx = 0; catch_sig_list[sig_indx] != -1; ++sig_indx) { |
| 578 signal(SIGINT, sighandler); |
607 if((prev_sig_disp = signal(catch_sig_list[sig_indx], sighandler)) == SIG_ERR) { |
| 579 signal(SIGTERM, sighandler); |
608 char errmsg[BUFSIZ]; |
| 580 signal(SIGQUIT, sighandler); |
609 sprintf(errmsg, "Warning: couldn't set signal %d for catching", |
| 581 signal(SIGPIPE, SIG_IGN); |
610 catch_sig_list[sig_indx]); |
| 582 signal(SIGCHLD, sighandler); |
611 perror(errmsg); |
| |
612 } |
| |
613 } |
| |
614 for(sig_indx = 0; ignore_sig_list[sig_indx] != -1; ++sig_indx) { |
| |
615 if((prev_sig_disp = signal(ignore_sig_list[sig_indx], SIG_IGN)) == SIG_ERR) { |
| |
616 char errmsg[BUFSIZ]; |
| |
617 sprintf(errmsg, "Warning: couldn't set signal %d to ignore", |
| |
618 ignore_sig_list[sig_indx]); |
| |
619 perror(errmsg); |
| |
620 } |
| |
621 } |
| 583 #endif |
622 #endif |
| 584 |
623 |
| 585 |
624 |
| 586 #ifdef USE_APPLET |
625 #ifdef USE_APPLET |
| 587 init_applet_mgr(argc, argv); |
626 init_applet_mgr(argc, argv); |