OK, I got my answer, will google better next time .)

http://www.qtcentre.org/archive/index.php/t-21447.html
wysota
27th December 2010, 23:29
On Unix systems there is no mandatory locking which means in a general case you cannot prevent someone else from writing to the same file while you have it open. It requires cooperation of all involved sides and use of advisory locking (e.g. using flock). Some filesystems may implement mandatory locking (through fcntl calls) but others will not and on some systems (like Linux) mandatory locks are unreliable (see the man page for fcntl)