]> code.citadel.org Git - citadel.git/commitdiff
* citadel.c: temporarily commented out the signal() call for SIGHUP because
authorArt Cancro <ajc@citadel.org>
Sat, 24 Jul 2004 05:11:53 +0000 (05:11 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 24 Jul 2004 05:11:53 +0000 (05:11 +0000)
  it is causing the client not to work at all on Linux 2.6 (or at least on
  Fedora Core 2) when citadel is called as the login shell -- a SIGHUP is
  mysteriously received at the username prompt and the program exits.

citadel/ChangeLog
citadel/citadel.c
citadel/citadel_decls.h
citadel/commands.c

index ce86c8f7c68ba0f596344bc3b059fdedfa4a61cd..cf423251af2c2d812c9f78cba671fa6ce46b95df 100644 (file)
@@ -1,4 +1,10 @@
  $Log$
+ Revision 623.6  2004/07/24 05:11:52  ajc
+ * citadel.c: temporarily commented out the signal() call for SIGHUP because
+   it is causing the client not to work at all on Linux 2.6 (or at least on
+   Fedora Core 2) when citadel is called as the login shell -- a SIGHUP is
+   mysteriously received at the username prompt and the program exits.
+
  Revision 623.5  2004/07/15 02:54:49  ajc
  * serv_network.c: grab and use a networker-local copy of the network
    configuration, ensuring that it doesn't accidentally get clobbered while
@@ -5923,3 +5929,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index f99cbb7f9b6fcd732868c12abf2d53bcc5fd91cb..c2ac6f7d940a6a746b6b38d8d23cab6aa79a62a1 100644 (file)
@@ -109,7 +109,7 @@ CtdlIPC *ipc_for_signal_handlers;   /* KLUDGE cover your eyes */
 /*
  * here is our 'clean up gracefully and exit' routine
  */
-void logoff(CtdlIPC *ipc, int code)
+void ctdl_logoff(char *file, int line, CtdlIPC *ipc, int code)
 {
        int lp;
 
@@ -148,6 +148,11 @@ void logoff(CtdlIPC *ipc, int code)
        }
        color(ORIGINAL_PAIR);   /* Restore the old color settings */
        sttybbs(SB_RESTORE);    /* return the old terminal settings */
+       /* 
+        * uncomment the following if you need to know why Citadel exited
+       printf("*** Exit code %d at %s:%d\n", code, file, line);
+       sleep(2);
+        */
        exit(code);             /* exit with the proper exit code */
 }
 
@@ -1046,7 +1051,7 @@ int main(int argc, char **argv)
        sttybbs(SB_SAVE);       /* Store the old terminal parameters */
        load_command_set();     /* parse the citadel.rc file */
        sttybbs(SB_NO_INTR);    /* Install the new ones */
-       signal(SIGHUP, dropcarr);       /* Cleanup gracefully if carrier is dropped */
+       /* signal(SIGHUP, dropcarr);FIXME */    /* Cleanup gracefully if carrier is dropped */
        signal(SIGPIPE, dropcarr);      /* Cleanup gracefully if local conn. dropped */
        signal(SIGTERM, dropcarr);      /* Cleanup gracefully if terminated */
        signal(SIGCONT, catch_sigcont); /* Catch SIGCONT so we can reset terminal */
index 0daa6c2f37e1161111bb141650c1c2bdb752b3d5..26ffd01d37baef2f0f719564d6b70b1119a6b6e9 100644 (file)
@@ -26,7 +26,8 @@ extern char arg_screen;
 extern char rc_alt_semantics;
 extern char rc_reply_extedit;
 extern char instant_msgs;
-void logoff(CtdlIPC *ipc, int code);
+void ctdl_logoff(char *file, int line, CtdlIPC *ipc, int code);
+#define logoff(ipc, code)      ctdl_logoff(__FILE__, __LINE__, ipc, code)
 void formout(CtdlIPC *ipc, char *name);
 void sighandler(int which_sig);
 extern int secure;
index d6e1b04b86b5a1a0c9dc502d053f45b05619d8df..ea3e527cb03695cddea6507830fd8b4919e6f750 100644 (file)
@@ -506,8 +506,9 @@ int inkey(void)
 
 #ifndef DISABLE_CURSES
 #if defined(HAVE_CURSES_H) || defined(HAVE_NCURSES_H)
-               if (a == ERR)
+               if (a == ERR) {
                        logoff(NULL, 3);
+               }
 #endif
 #endif