I've received the following, which puzzles me.
> Start an xterm with luit (non-UTF-8 locale and "-lc" option or locale
> resource set to "true"):
>
> mfabian@magellan:~$ LANG=en_US xterm -lc &
>
> Within this xterm, do
>
> mfabian@magellan:~$ tail -f /etc/X11/XF86Config&
> [1] 19859
> mfabian@magellan:~$ InputDevice "Mouse[1]" "CorePointer"
> [...]
>
> Exit the shell in this xterm using "Control-d":
>
> mfabian@magellan:~$ exit
>
> The xterm window doesn't close. As soon as the tail is killed, the
> xterm closes.
Here's a paraphrase of the code that takes care of setting up the
child's terminal (error checking omitted). Anyone got an idea what
I'm missing?
pid = fork();
...
if(pid == 0) {
close(pty); /* master */
close(0);
close(1);
close(2);
pgrp = setsid();
tty = open(..., O_RDWI | O_NOCTTY); /* pty slave */
#ifdef TIOCSTTY
rc = ioctl(tty, TIOCSCTTY, (char*)0);
#endif
#ifdef SVR4
ioctl(tty, I_PUSH, "ptem");
ioctl(tty, I_PUSH, "ldterm");
ioctl(tty, I_PUSH, "ttcompat");
#endif
dup2(tty, 0);
dup2(tty, 1);
dup2(tty, 2);
if(tty > 2) close(tty);
execvp(...)
} else {
/* nothing interesting */
}
Juliusz
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel