From: pfc AT maker DOT com (Peter F. Caswell) Subject: Bug in b18?: lseek( 0, 0, SEEK_CUR ) returns EBADF 24 Jan 1998 00:14:15 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: gnu-win32 AT cygnus DOT com I'm trying to use tcl v8.0 to get timers and interactive I/O working at the same time. To do that, I'm stealing a trick from tk and setting up a channel handler for stdin. Well, when you call Tcl_GetDefaultStdChannel( TCL_STDIN ), the file tclUnixChan.c calls "lseek(0, (off_t)0, SEEK_CUR)" and checks for a failure with EBADF. I assume that this is there to check if stdin (fileno 0) really is open. Well, lseek is returning -1, and errno is set to EBADF. Yet, if I call fstat(0,...), this works fine. Obviously the file is there, but lseek is getting confused. Is it simply setting the wrong errno. I haven't pulled the sources for the library across, so I don't know what the lseek code is doing. I'm also having some problems getting further stuff to work with the background processing. It seems like select is swallowing the first character typed. But I haven't tracked this down yet. -pfc - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".