need xterm to log to a file

Thomas Dickey dickey@his.com
Fri Dec 10 11:50:00 GMT 2004


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



More information about the Cygwin-xfree mailing list