[5990] in Athena Bugs
decmips 7.1H: zwgc
daemon@ATHENA.MIT.EDU (geoff@ATHENA.MIT.EDU)
Sun Sep 9 21:03:05 1990
From: geoff@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Sun, 09 Sep 90 21:02:41 EDT
System name: hodge
Type and version: KN01 7.1H (1 update(s) to same version)
Display type: PM-MONO
What were you trying to do?
start zwgc in tty mode without DISPLAY set
What's wrong:
I typed "zwgc -ttymode &" (instead of "zwgc -ttymode") and
zwgc dumped core.
When DISPLAY is not set, ZSetLocation calls ttyname(0). If
zwgc is run in the background, then fd 0 has no tty,
and the call returns NULL. This is not checked, so the rindex
following dumps core.
What should have happened:
zwgc should have just run, without dumping core. Z_SendLocation()
should check the return value of ttyname, or call ttyname for fd 1.
Please describe any relevant documentation references:
It looks like backgrounding zwgc -ttymode makes zwgc dump core.