flock does not check the operation argument for validity
|Reported by:||bhaible||Owned by:||axeld|
|Has a Patch:||no||Platform:||All|
The flock() function does not return an error code when the operation argument is invalid. In the attached sample program a shared and exclusive lock is requested - obviously nonsense, but the BeOS implementation does not reject it.
Expected output: -1 and the value of EINVAL Actual output: 0 0
flock() is not specified by POSIX, therefore one has to look at the manual pages of some systems, such as Linux