2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 /* $Id: lock.c,v 1.5 1994/06/24 11:24:28 ceriel Exp $ */
14 char *tmpf = ".lockXXXXXX";
15 char *strrindex(), *strcpy(), *mktemp();
20 if (p = strrindex(buf, '/')) {
27 if ((fd = creat(buf, 0)) < 0)
30 ok = (link(buf, path) == 0);