From: Stephen D. <sd...@us...> - 2005-05-15 07:47:31
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15088/nsd Modified Files: tcljob.c tclobjv.c tclxkeylist.c unix.c Log Message: Hide global symbols which shouldn't be exported. Index: unix.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/unix.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** unix.c 4 May 2005 12:34:58 -0000 1.5 --- unix.c 15 May 2005 07:47:21 -0000 1.6 *************** *** 41,81 **** #include <grp.h> - static Ns_Mutex lock; - static int debugMode; - /* ! *---------------------------------------------------------------------- ! * ! * FatalSignalHandler -- ! * ! * Ensure that we drop core on fatal signals like SIGBUS and ! * SIGSEGV. ! * ! * Results: ! * None. ! * ! * Side effects: ! * A core file will be left wherever the server was running. ! * ! *---------------------------------------------------------------------- */ ! void ! FatalSignalHandler(int signal) ! { ! #ifdef __linux ! /* ! * LinuxThreads thread manager needs to kill all child threads ! * on fatal signals, else they get left behind as dead threads. ! * As of glibc 2.3 with NPTL, this should be a no-op. ! */ ! pthread_kill_other_threads_np(); ! #endif - Ns_Log(Fatal, "received fatal signal %d", signal); - abort(); - } --- 41,59 ---- #include <grp.h> /* ! * Static functions defined in this file. */ ! static int Pipe(int *fds, int sockpair); ! static void FatalSignalHandler(int signal); ! /* ! * Static variables defined in this file. ! */ ! ! static Ns_Mutex lock; ! static int debugMode; *************** *** 259,262 **** --- 237,252 ---- */ + int + ns_sockpair(int *socks) + { + return Pipe(socks, 1); + } + + int + ns_pipe(int *fds) + { + return Pipe(fds, 0); + } + static int Pipe(int *fds, int sockpair) *************** *** 270,291 **** } if (!err) { ! fcntl(fds[0], F_SETFD, 1); ! fcntl(fds[1], F_SETFD, 1); } return err; } - int - ns_sockpair(int *socks) - { - return Pipe(socks, 1); - } - - int - ns_pipe(int *fds) - { - return Pipe(fds, 0); - } - /* --- 260,269 ---- } if (!err) { ! fcntl(fds[0], F_SETFD, 1); ! fcntl(fds[1], F_SETFD, 1); } return err; } /* *************** *** 552,555 **** --- 530,567 ---- return rc; } + #endif + + /* + *---------------------------------------------------------------------- + * + * FatalSignalHandler -- + * + * Ensure that we drop core on fatal signals like SIGBUS and + * SIGSEGV. + * + * Results: + * None. + * + * Side effects: + * A core file will be left wherever the server was running. + * + *---------------------------------------------------------------------- + */ + + static void + FatalSignalHandler(int signal) + { + #ifdef __linux + /* + * LinuxThreads thread manager needs to kill all child threads + * on fatal signals, else they get left behind as dead threads. + * As of glibc 2.3 with NPTL, this should be a no-op. + */ + + pthread_kill_other_threads_np(); #endif + + Ns_Log(Fatal, "received fatal signal %d", signal); + abort(); + } Index: tclxkeylist.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclxkeylist.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tclxkeylist.c 6 Mar 2005 18:37:07 -0000 1.2 --- tclxkeylist.c 15 May 2005 07:47:21 -0000 1.3 *************** *** 67,71 **** * Used to return argument messages by most commands. */ ! char *tclXWrongArgs = "wrong # args: "; /* --- 67,71 ---- * Used to return argument messages by most commands. */ ! static char *tclXWrongArgs = "wrong # args: "; /* Index: tclobjv.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclobjv.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tclobjv.c 9 Apr 2005 14:43:09 -0000 1.6 --- tclobjv.c 15 May 2005 07:47:21 -0000 1.7 *************** *** 47,52 **** static Tcl_SetFromAnyProc SetSpecFromAny; ! Ns_ObjvProc ObjvTcl; ! Ns_ObjvProc ObjvTclArgs; static void FreeSpecs(Ns_ObjvSpec *optSpec); --- 47,52 ---- static Tcl_SetFromAnyProc SetSpecFromAny; ! static Ns_ObjvProc ObjvTcl; ! static Ns_ObjvProc ObjvTclArgs; static void FreeSpecs(Ns_ObjvSpec *optSpec); *************** *** 855,859 **** */ ! int ObjvTcl(Ns_ObjvSpec *spec, Tcl_Interp *interp, int *objcPtr, Tcl_Obj *CONST objv[]) { --- 855,859 ---- */ ! static int ObjvTcl(Ns_ObjvSpec *spec, Tcl_Interp *interp, int *objcPtr, Tcl_Obj *CONST objv[]) { *************** *** 888,892 **** */ ! int ObjvTclArgs(Ns_ObjvSpec *spec, Tcl_Interp *interp, int *objcPtr, Tcl_Obj *CONST objv[]) { --- 888,892 ---- */ ! static int ObjvTclArgs(Ns_ObjvSpec *spec, Tcl_Interp *interp, int *objcPtr, Tcl_Obj *CONST objv[]) { Index: tcljob.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tcljob.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tcljob.c 16 Feb 2005 08:40:34 -0000 1.1.1.1 --- tcljob.c 15 May 2005 07:47:21 -0000 1.2 *************** *** 183,191 **** static Job* getNextJob(void); ! Queue* NewQueue(CONST char* queueName, CONST char* queueDesc, int maxThreads); ! void FreeQueue(Queue *queuePtr); ! Job* NewJob(CONST char* server, CONST char* queueName, int type, Tcl_Obj *script); ! void FreeJob(Job *jobPtr); static int LookupQueue(Tcl_Interp *interp, --- 183,191 ---- static Job* getNextJob(void); ! static Queue* NewQueue(CONST char* queueName, CONST char* queueDesc, int maxThreads); ! static void FreeQueue(Queue *queuePtr); ! static Job* NewJob(CONST char* server, CONST char* queueName, int type, Tcl_Obj *script); ! static void FreeJob(Job *jobPtr); static int LookupQueue(Tcl_Interp *interp, *************** *** 1233,1237 **** */ ! Queue* NewQueue(CONST char* queueName, CONST char* queueDesc, int maxThreads) { --- 1233,1237 ---- */ ! static Queue* NewQueue(CONST char* queueName, CONST char* queueDesc, int maxThreads) { *************** *** 1275,1279 **** */ ! void FreeQueue(Queue *queuePtr) { --- 1275,1279 ---- */ ! static void FreeQueue(Queue *queuePtr) { *************** *** 1302,1306 **** */ ! Job* NewJob(CONST char* server, CONST char* queueId, int type, Tcl_Obj *script) { --- 1302,1306 ---- */ ! static Job* NewJob(CONST char* server, CONST char* queueId, int type, Tcl_Obj *script) { *************** *** 1344,1348 **** */ ! void FreeJob(Job *jobPtr) { --- 1344,1348 ---- */ ! static void FreeJob(Job *jobPtr) { |