Subject: Re: Semantics of lseek system call
To: None <mycroft@gnu.ai.mit.edu>
From: Kenneth Stailey <kstailey@leidecker.gsfc.nasa.gov>
List: current-users
Date: 12/01/1994 11:41:10
UNIX System V/386 Release 3.2
calvin
Copyright (C) 1984, 1986, 1987, 1988 AT&T
Copyright (C) 1987, 1988 Microsoft Corp.
All Rights Reserved

kstailey@calvin$ a.out
Offset: 20; Errno: 0 
Offset: 10; Errno: 0
Offset: 0; Errno: 0
Offset: -1; Errno: 22
Offset: 900224; Errno: 22
Offset: 900214; Errno: 22

Yes, USG doesn't let you and BSD does.

Possible justifications:

Advisory lock on negative file offsets as an ICKY IPC.

Crazy algorithms for moving the file pointer that temporarily move into
the red zone before bumping out of it and doing I/O.