Index: xc/programs/Xserver/Xprint/etc/init.d/xprint =================================================================== RCS file: /cvs/xprint/xprint/src/xprint_main/xc/programs/Xserver/Xprint/etc/init.d/xprint,v retrieving revision 1.52 diff -u -2 -0 -r1.52 xprint --- xc/programs/Xserver/Xprint/etc/init.d/xprint 9 Jun 2004 04:02:04 -0000 1.52 +++ xc/programs/Xserver/Xprint/etc/init.d/xprint 19 Jun 2004 07:30:25 -0000 @@ -561,50 +561,50 @@ curr=0 while [ $curr -lt $num_xpstart ] ; do if [ "${xpstart_remote_server[$curr]}" != "" ] ; then # Remote Xprt, just put the entry into the registry lock_server_registry echo "display=${xpstart_remote_server[$curr]}" >>"${XP_SERVERS}" unlock_server_registry else # Run block in seperate process to avoid that changes to the # xpstart_* variables affect the next cycle ( # Use defaults if there are no special options [ "${xpstart_fontpath[$curr]}" = "" ] && xpstart_fontpath[$curr]="${default_fontpath}"; [ "${xpstart_fontpath_acceptpattern[$curr]}" = "" ] && xpstart_fontpath_acceptpattern[$curr]="$default_fontpath_acceptpattern"; [ "${xpstart_fontpath_rejectpattern[$curr]}" = "" ] && xpstart_fontpath_rejectpattern[$curr]="$default_fontpath_rejectpattern"; [ "${xpstart_displayid[$curr]}" = "" ] && xpstart_displayid[$curr]="$(FindFreeXDisplayNum)" [ "${xpstart_logger[$curr]}" = "" ] && xpstart_logger[$curr]="logger -p lpr.notice -t Xprt_${xpstart_displayid[$curr]}"; [ "${xpstart_logfile[$curr]}" = "" ] && xpstart_logfile[$curr]="/dev/null"; [ "${xpstart_xprt_binary[$curr]}" = "" ] && xpstart_xprt_binary[$curr]="${XPRT_BIN}"; if [ "${xpstart_xprt_binary[$curr]}" = "/usr/openwin/bin/Xprt" -o "$(uname -s)" = "SunOS" ] ; then - # Solaris /usr/openwin/bin/Xprt does not support "-nolisten tcp" + # Solaris /usr/openwin/bin/Xprt does not support "-nolisten tcp" or "noreset" # yet nor is it possible to run a Xserver on a unix socket only # in Solaris since access to the unix domain sockets in # /tmp/.X11-pipe and /tmp/.X11-unix is restricted to applications # with group-id "root" (e.g. the Xprt server would need to be # setgid "root" that plain users can start it listening on a unix # socket only) [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn" else - [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn -nolisten tcp" + [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn -nolisten tcp -noreset" fi # Check if the Xprt binary is available if [ ! -x "${xpstart_xprt_binary[$curr]}" ] ; then error_echo "Can't find \"${xpstart_xprt_binary[$curr]}\"." exit 1 # exit block fi # Verify and set location of font encodings directory file if [ "${xpstart_font_encodings_dir[$curr]}" = "" ] ; then if [ -f "${XPROJECTROOT}/lib/X11/fonts/xf86encodings/encodings.dir" ] ; then xpstart_font_encodings_dir[$curr]="${XPROJECTROOT}/lib/X11/fonts/xf86encodings/encodings.dir" else xpstart_font_encodings_dir[$curr]="${XPROJECTROOT}/lib/X11/fonts/encodings/encodings.dir"; fi fi unset FONT_ENCODINGS_DIRECTORY if [ ! -f "${xpstart_font_encodings_dir[$curr]}" ] ; then warning_echo "Can't find \"${xpstart_font_encodings_dir[$curr]}\", TrueType font support may not work." Index: xc/programs/Xserver/dix/dispatch.c =================================================================== RCS file: /cvs/xprint/xprint/src/xprint_main/xc/programs/Xserver/dix/dispatch.c,v retrieving revision 1.2 diff -u -2 -0 -r1.2 dispatch.c --- xc/programs/Xserver/dix/dispatch.c 8 Jul 2003 04:39:56 -0000 1.2 +++ xc/programs/Xserver/dix/dispatch.c 19 Jun 2004 07:30:26 -0000 @@ -3453,41 +3453,41 @@ if (!k5_Vector[i]) { k5_Vector[i] = k5_bad; } #endif } for(i = LASTEvent; i < 128; i++) { EventSwapVector[i] = NotImplemented; } } /********************** * CloseDownClient * * Client can either mark his resources destroy or retain. If retained and * then killed again, the client is really destroyed. *********************/ -Bool terminateAtReset = FALSE; +char dispatchExceptionAtReset = DE_RESET; void CloseDownClient(client) register ClientPtr client; { Bool really_close_down = client->clientGone || client->closeDownMode == DestroyAll; if (!client->clientGone) { /* ungrab server if grabbing client dies */ if (grabState != GrabNone && grabClient == client) { UngrabServer(client); } BITCLEAR(grabWaiters, client->index); DeleteClientFromAnySelections(client); ReleaseActiveGrabs(client); DeleteClientFontStuff(client); if (!really_close_down) @@ -3519,46 +3519,42 @@ #ifdef LBX ProcessQTagZombies(); #endif CloseDownConnection(client); /* If the client made it to the Running stage, nClients has * been incremented on its behalf, so we need to decrement it * now. If it hasn't gotten to Running, nClients has *not* * been incremented, so *don't* decrement it. */ if (client->clientState != ClientStateInitial && client->clientState != ClientStateAuthenticating ) { --nClients; } } if (really_close_down) { if (client->clientState == ClientStateRunning && nClients == 0) - { - if (terminateAtReset) - dispatchException |= DE_TERMINATE; - else - dispatchException |= DE_RESET; - } + dispatchException |= dispatchExceptionAtReset; + client->clientState = ClientStateGone; if (ClientStateCallback) { NewClientInfoRec clientinfo; clientinfo.client = client; clientinfo.prefix = (xConnSetupPrefix *)NULL; clientinfo.setup = (xConnSetup *) NULL; CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); } FreeClientResources(client); if (client->index < nextFreeClientID) nextFreeClientID = client->index; clients[client->index] = NullClient; xfree(client); while (!clients[currentMaxClients-1]) currentMaxClients--; } } Index: xc/programs/Xserver/os/utils.c =================================================================== RCS file: /cvs/xprint/xprint/src/xprint_main/xc/programs/Xserver/os/utils.c,v retrieving revision 1.5 diff -u -2 -0 -r1.5 utils.c --- xc/programs/Xserver/os/utils.c 17 May 2004 01:16:31 -0000 1.5 +++ xc/programs/Xserver/os/utils.c 19 Jun 2004 07:30:27 -0000 @@ -550,76 +550,82 @@ UseMsg(); } #endif #ifndef NOLOGOHACK else if ( strcmp( argv[i], "-logo") == 0) { logoScreenSaver = 1; } else if ( strcmp( argv[i], "nologo") == 0) { logoScreenSaver = 0; } #endif else if ( strcmp( argv[i], "-nolisten") == 0) { if(++i < argc) protNoListen = argv[i]; else UseMsg(); } + else if ( strcmp( argv[i], "-noreset") == 0) + { + extern char dispatchExceptionAtReset; + + dispatchExceptionAtReset = 0; + } else if ( strcmp( argv[i], "-p") == 0) { if(++i < argc) defaultScreenSaverInterval = ((CARD32)atoi(argv[i])) * MILLI_PER_MIN; else UseMsg(); } else if ( strcmp( argv[i], "-pn") == 0) PartialNetwork = TRUE; else if ( strcmp( argv[i], "r") == 0) defaultKeyboardControl.autoRepeat = TRUE; else if ( strcmp( argv[i], "-r") == 0) defaultKeyboardControl.autoRepeat = FALSE; else if ( strcmp( argv[i], "-s") == 0) { if(++i < argc) defaultScreenSaverTime = ((CARD32)atoi(argv[i])) * MILLI_PER_MIN; else UseMsg(); } else if ( strcmp( argv[i], "-su") == 0) disableSaveUnders = TRUE; else if ( strcmp( argv[i], "-t") == 0) { if(++i < argc) defaultPointerControl.threshold = atoi(argv[i]); else UseMsg(); } else if ( strcmp( argv[i], "-terminate") == 0) { - extern Bool terminateAtReset; + extern char dispatchExceptionAtReset; - terminateAtReset = TRUE; + dispatchExceptionAtReset = DE_TERMINATE; } else if ( strcmp( argv[i], "-to") == 0) { if(++i < argc) TimeOutValue = ((CARD32)atoi(argv[i])) * MILLI_PER_SECOND; else UseMsg(); } else if ( strcmp( argv[i], "-tst") == 0) { noTestExtensions = TRUE; } else if ( strcmp( argv[i], "v") == 0) defaultScreenSaverBlanking = PreferBlanking; else if ( strcmp( argv[i], "-v") == 0) defaultScreenSaverBlanking = DontPreferBlanking; else if ( strcmp( argv[i], "-wm") == 0) defaultBackingStore = WhenMapped; else if ( strcmp( argv[i], "-maxbigreqsize") == 0) { if(++i < argc) {