Negative Offset

Function: int fcntl(int fd, int cmd, struct flock * lock)

Data Type: struct flock
This structure is used with the fcntl function to describe a file lock. It has these members:

off_t l_start
    This specifies the offset of the start of the region to which the lock applies, and is given in bytes relative to the point specified by l_whence member.

off_t l_len
    This specifies the length of the region to be locked. A value of 0 is treated specially; it means the region extends to the end of the file.

Can I set negative offset to l_start?

off_t is a typedef for long (C99 standard) so, yes it can be negative if the l_whence is SEEK_CUR or SEEK_END