This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Bug in b18?: lseek( 0, 0, SEEK_CUR ) returns EBADF


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@cygnus.com" with one line of text: "help".


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