Lines Matching refs:lockname
131 env_opts.lockname = optarg; in parse_common_args()
208 char *lockname = "/var/lock/" CMD_PRINTENV ".lock"; in main() local
240 if (env_opts.lockname) { in main()
241 lockname = malloc(strlen(env_opts.lockname) + in main()
243 if (!lockname) { in main()
248 sprintf(lockname, "%s/%s.lock", in main()
249 env_opts.lockname, CMD_PRINTENV); in main()
252 lockfd = open(lockname, O_WRONLY | O_CREAT | O_TRUNC, 0666); in main()
254 fprintf(stderr, "Error opening lock file %s\n", lockname); in main()
259 fprintf(stderr, "Error locking file %s\n", lockname); in main()
277 if (env_opts.lockname) in main()
278 free(lockname); in main()