From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2f48ce8eef5b25af X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-01-25 17:18:55 PST Path: pad-thai.cam.ov.com!bloom-beacon.mit.edu!spool.mu.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!newsrelay.iastate.edu!news.iastate.edu!camry.cc.iastate.edu!kekelley From: kekelley@iastate.edu (Karl E Kelley) Newsgroups: comp.unix.osf.osf1 Subject: Re: OSF1 V3.0 problem - hanging X session dxconsole job fills up disk with log messages Date: 25 Jan 95 22:37:33 GMT Organization: Iowa State University, Ames, Iowa Message-ID: References: <23JAN95.11044155@tifrvax.tifr.res.in> NNTP-Posting-Host: camry.cc.iastate.edu In <23JAN95.11044155@tifrvax.tifr.res.in> kp@tifrvax.tifr.res.in writes: >We have this problem on OSF1 V3.0. Hanging X session dxconsole job fills up >the disk by writing X Toolkit Warning: Select failed; error code 9 messages >to .xsession-errors file. >Why and what is the solution ? >kp@tifrvax.tifr.res.in >xsession-errors file >X Toolkit Warning: Cannot convert string "-*-Menu-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1" to type FontStruct >X Toolkit Warning: Cannot convert string "-*-Menu-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1" to type FontStruct >X Toolkit Warning: Select failed; error code 9 We have also experienced this problem with OSF1 V1.3 and V2.1, though not with dxconsole. The problem is essentially that dxconsole or any other program that opens /dev/console and uses XtAppAddInput() with the file descriptor for the open /dev/console, and /usr/sbin/getty on the console, will get this warning message either when getty is started, or when the console getty receives a HUP signal. /usr/sbin/getty uses the revoke() syscall before it (re)opens any terminal device, this syscall invalidates all file descriptors that may be open for the same device, in this case /dev/console. Error number 9 is EBADF - Bad file number, and the X library is getting that error when it issues a select() syscall involving the file descriptor, unfortunately, there is no particularly easy way for an X application to determine that this has happened except to intercept the warning message and have the application reopen /dev/cansole. In our case, the application getting the message could be modified to do that, but I would suspect that when using the dxconsole program, the only way to fix this is to adjust the starting order of getty and dxconsole, so that getty is started first before dxconsole tries to open /dev/console. Or maybe telling dxconsole to quit on an error would work, but I wouldn't count on it, another possibility is invoke dxconsole so that its stdout is re-directed to /dev/null, I think that is the way that dxconsole is invoked with the DEC-supplied xdm. -- Karl E. Kelley Systems Programmer Iowa State University Computation Center Phone (515) 294-0005 Ames, Iowa 50011