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.53 diff -u -2 -0 -r1.53 xprint --- xc/programs/Xserver/Xprint/etc/init.d/xprint 19 Jun 2004 07:33:28 -0000 1.53 +++ xc/programs/Xserver/Xprint/etc/init.d/xprint 19 Jun 2004 21:23:00 -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" or "noreset" + # Solaris /usr/openwin/bin/Xprt does not support "-nolisten tcp" # 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 -noreset" + [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn -nolisten tcp" 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.3 diff -u -2 -0 -r1.3 dispatch.c --- xc/programs/Xserver/dix/dispatch.c 19 Jun 2004 07:33:28 -0000 1.3 +++ xc/programs/Xserver/dix/dispatch.c 19 Jun 2004 21:23:02 -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. *********************/ -char dispatchExceptionAtReset = DE_RESET; +char dispatchExceptionAtReset = 0; /* default for Xprt is |0|, video Xservers use |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) 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.6 diff -u -2 -0 -r1.6 utils.c --- xc/programs/Xserver/os/utils.c 19 Jun 2004 07:33:28 -0000 1.6 +++ xc/programs/Xserver/os/utils.c 19 Jun 2004 21:23:02 -0000 @@ -309,40 +309,42 @@ ErrorF("-f # bell base (0-100)\n"); ErrorF("-fc string cursor font\n"); ErrorF("-fn string default font name\n"); ErrorF("-fp string default font path\n"); ErrorF("-help prints message with these options\n"); ErrorF("-I ignore all remaining arguments\n"); #ifdef RLIMIT_DATA ErrorF("-ld int limit data space to N Kb\n"); #endif #ifdef RLIMIT_NOFILE ErrorF("-lf int limit number of open files to N\n"); #endif #ifdef RLIMIT_STACK ErrorF("-ls int limit stack space to N Kb\n"); #endif #ifndef NOLOGOHACK ErrorF("-logo enable logo in screen saver\n"); ErrorF("nologo disable logo in screen saver\n"); #endif ErrorF("-nolisten string don't listen on protocol\n"); + ErrorF("-noreset don't reset after last client exists\n"); + ErrorF("-reset reset after last client exists\n"); ErrorF("-p # screen-saver pattern duration (minutes)\n"); ErrorF("-pn accept failure to listen on all ports\n"); ErrorF("-r turns off auto-repeat\n"); ErrorF("r turns on auto-repeat \n"); ErrorF("-s # screen-saver timeout (minutes)\n"); #ifdef XCSECURITY ErrorF("-sp file security policy file\n"); #endif ErrorF("-su disable any save under support\n"); ErrorF("-t # mouse threshold (pixels)\n"); ErrorF("-terminate terminate at server reset\n"); ErrorF("-to # connection time out\n"); ErrorF("-tst disable testing extensions\n"); ErrorF("ttyxx server started from init on /dev/ttyxx\n"); ErrorF("v video blanking for screen-saver\n"); ErrorF("-v screen-saver without video blanking\n"); ErrorF("-wm WhenMapped default backing-store\n"); ErrorF("-maxbigreqsize Maximum request size for the BIG-REQUESTS extension (megabytes)\n"); #ifdef PANORAMIX ErrorF("+xinerama Enable XINERAMA extension\n"); @@ -556,40 +558,46 @@ 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], "-reset") == 0) + { + extern char dispatchExceptionAtReset; + + dispatchExceptionAtReset = DE_RESET; + } 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