The Linux man page about fcntl says the following:
As well as being removed by an explicit F_UNLCK, record locks are automatically released when the process