Lines Matching refs:name
18 * information: Portions Copyright [yyyy] [name of copyright owner]
40 * make a lock file with given 'name'
45 * name - name of the lock file to make
53 mklock(char *name)
67 if (onelock(pid, tempfile, name) == -1) {
69 if (cklock(name))
72 if (onelock(pid, tempfile, name)) {
79 stlock(name);
92 cklock(char *name)
99 fd = open(name, O_RDONLY);
100 DEBUG(4, "ulockf name %s\n", name);
125 DEBUG(4, "--ok to remove lock file (%s)\n", name);
128 if (unlink(name) != 0) {
140 * put name in list of lock files
145 stlock(char *name)
157 p = calloc((unsigned)strlen(name) + 1, sizeof (char));
158 ASSERT(p != NULL, "CAN NOT ALLOCATE FOR", name, 0);
159 (void) strcpy(p, name);
170 rmlock(char *name)
177 if (name == NULL || EQUALS(name, Lockfile[i])) {
189 * tempfile - name of a temporary in the same file system
190 * name - lock file name (full path name)
196 onelock(char *pid, char *tempfile, char *name)
204 "%s %s %d", tempfile, name, errno);
213 "%s %s %d", tempfile, name, errno);
221 if (link(tempfile, name) < 0) {
224 DEBUG(4, "%s)\n", name);