This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: need xterm to log to a file


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]