Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!pacbell.com!ames!fxgrp!grady From: grady@fx.com (Steven Grady) Newsgroups: comp.windows.x Subject: xdm question Message-ID: <1991Jan25.003801.13330@fxgrp.fx.com> Date: 25 Jan 91 00:38:01 GMT Sender: news@fxgrp.fx.com (News) Reply-To: grady@postgres.berkeley.edu Organization: FXD/Telerate, Mountain View, CA Lines: 28 Environment: X11.4 on a SparcStation 1 running SunOS 4.1. We've been trying to use a script to start X and another program (something that redirects console messages) as the X server started by xdm. It took us a while to get things right, because there were some unexpected signals that got sent to the "server". Specifically, the server receives a number of SIGIOs when xdm terminates it (when the user hits a key-sequence generating an abort-display() call). Anyone know why this is happening? Also, to terminate the server, xdm sends a SIGTERM, followed by a SIGCONT. This sort of makes sense, since somehow after the user logs out, X is in status "STOP". Why would this be? No one sends out a SIGSTOP (from looking at xdm, dix, and libX). Is this intentional behavior? Some of the obscure stuff in xdm could be better commented.. BTW, it took us some time to fix this. Shell scripts do something weird with SIGTERM (even if you explicitly trap them), so we couldn't use sh. We went with perl instead. The script starts X and the console process, traps all signals to forward them to X, waits for X to exit, then kills the console process and exits with the X exit value. Not forwarding all signals, or not waiting for X to exit, will cause strange, bad behavior.. -- Steven grady@fx.com "If you wanted to make Sarok the Preparer cry, well, mission accomplished."