lock test from sh script

Pieter de Goeje pdegoeje at service2media.com
Fri Oct 17 11:53:21 UTC 2008

On Friday 17 October 2008, Igor Pokrovsky wrote:
> Hi all!
> I need to check if file is locked or not (with flock) from a shell
> script. I remember there was something but cannot recall what exactly.
> And if possible I do not want to write my own test utility even it
> is several lines in length)
> Thanks,
> -ip

Perhaps you mean lockf(3) ?

Pieter de Goeje

More information about the freebsd-hackers mailing list