| 336 | } |
| 337 | |
| 338 | int commit_lock_file(struct lock_file *lk) |
| 339 | { |
| 340 | char *result_path = get_locked_file_path(lk); |
| 341 | |
| 342 | delete_tempfile(&lk->pid_tempfile); |
| 343 | |
| 344 | if (commit_lock_file_to(lk, result_path)) { |
| 345 | int save_errno = errno; |
| 346 | free(result_path); |
| 347 | errno = save_errno; |
| 348 | return -1; |
| 349 | } |
| 350 | free(result_path); |
| 351 | return 0; |
| 352 | } |
| 353 | |
| 354 | int rollback_lock_file(struct lock_file *lk) |
| 355 | { |
no test coverage detected