This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: need xterm to log to a file
- From: Thomas Dickey <dickey at his dot com>
- To: cygwin-xfree at cygwin dot com
- Date: Fri, 10 Dec 2004 06:50:11 -0500 (EST)
- Subject: Re: need xterm to log to a file
- References: <loom.20041209T173454-977@post.gmane.org>
- Reply-to: cygwin-xfree at cygwin dot com
On Thu, 9 Dec 2004, Al Goodman wrote:
On unix, xterm has an option that will enable it to log info typed and
displayed to be logged to a file. I downloaded the xterm source and
compiled it. When I enabled the option via Cntl-mouse-left-click the
window hung. Any suggestions on how to log input and output of an xterm
would be appreciated.
I see it's a (usually minor) error in xterm, which runs into a cygwin bug.
The function creat_as() does a fork/wait, assuming that it has to strip
off the setuid/setgid privilges. That's not needed in cygwin, but the
fork/wait doesn't work (looks like a cygwin bug). I'll add a fix in #198
so it will work for cygwin.
This is all that's needed from creat_as (before the fork):
#ifdef __CYGWIN__
{
fd = open(pathname,
O_WRONLY | O_CREAT | (append ? O_APPEND : O_EXCL),
mode);
if (fd >= 0) {
close(fd);
return 1;
} else
return 0;
}
#endif
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net