wayne@ames.arc.nasa.gov (Wayne Hathaway) (02/15/89)
I have a driver that provides normal file I/O capabilities to a UNIX user process, but which in fact sends and receives over a network. No big deal, and it works fine. However, after a user process has been reading or writing for a while, poof: EINVAL. Why? Because the file offset (file pointer) has grown into a negative number (for example, at 2^31 bytes). I have no questions about WHY this is happening, but would love to be able to PREVENT it (other than by having the user process do a periodic lseek() to reset the offset). Unfortunately, by the time the user's read or write requests get to my driver, the file descriptor is long lost, having been turned into major and minor device number, so I have no way of getting back to the file table. Anybody got any suggestions? This is for both BSD and System V, by the way. It's not a real problem on a Cray (even at our network speeds it will take a while to transfer 2^63 bytes :-), but it only takes a Sun a few hours to hit its 2^31 byte limit. Thanx for any ideas. Wayne Hathaway Ultra Network Technologies domain: wayne@Ultra.COM 101 Daggett Drive Internet: ultra!wayne@Ames.ARC.NASA.GOV San Jose, CA 95134 uucp: ...!ames!ultra!wayne 408-922-0100