X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib_internal%2Futil-lockfile.c;h=f270ec49d1f3526ed6953020748e038e3f421fa8;hb=b7785f953cf988346d0f36c5852af39db3d1b00c;hp=963c3b8ba880c749a9db9a84b37a4b9988f1a167;hpb=19ef6bad17e92a9cedb7db8eddee2bebf1aa7c4d;p=util-vserver.git diff --git a/lib_internal/util-lockfile.c b/lib_internal/util-lockfile.c index 963c3b8..f270ec4 100644 --- a/lib_internal/util-lockfile.c +++ b/lib_internal/util-lockfile.c @@ -1,4 +1,4 @@ -// $Id: util-lockfile.c 1616 2004-07-02 23:34:52Z ensc $ --*- c -*-- +// $Id: util-lockfile.c 2678 2008-02-16 22:09:30Z dhozac $ --*- c -*-- // Copyright (C) 2004 Enrico Scholz // @@ -61,8 +61,8 @@ lockfile(int *fd, char const *filename, int op, long timeout, alarm(timeout); } - errstr = "flock()"; - while (flock(*fd, op)==-1) { + errstr = "lockf()"; + while (lockf(*fd, op, 0)==-1) { if ((errno!=EINTR && errno!=EINTR) || alarm_flag) goto err; }