Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit73496c4

Browse files
committed
Fix broken tests.validate.ValidateTest.test_validate_instance_with_several_corrupt_backups_interrupt
+fix small typo introduced in02a3665
1 parentfc752c8 commit73496c4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/catalog.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ static int grab_excl_lock_file(const char *backup_dir, const char *backup_id, bo
3232
staticintgrab_shared_lock_file(pgBackup*backup);
3333
staticintwait_shared_owners(pgBackup*backup);
3434

35+
36+
staticvoidunlink_lock_atexit(boolfatal,void*userdata);
3537
staticvoidunlock_backup(constchar*backup_dir,constchar*backup_id,boolexclusive);
3638
staticvoidrelease_excl_lock_file(constchar*backup_dir);
3739
staticvoidrelease_shared_lock_file(constchar*backup_dir);
@@ -83,8 +85,8 @@ timelineInfoFree(void *tliInfo)
8385
}
8486

8587
/* Iterate over locked backups and unlock them */
86-
staticvoid
87-
unlink_lock_atexit(void)
88+
void
89+
unlink_lock_atexit(boolunused_fatal,void*unused_userdata)
8890
{
8991
inti;
9092

@@ -94,7 +96,7 @@ unlink_lock_atexit(void)
9496
for (i=0;i<parray_num(locks);i++)
9597
{
9698
LockInfo*lock= (LockInfo*)parray_get(locks,i);
97-
unlock_backup(lock->backup_dir,lock->backup_dir,lock->exclusive);
99+
unlock_backup(lock->backup_dir,lock->backup_id,lock->exclusive);
98100
}
99101

100102
parray_walk(locks,pg_free);
@@ -267,7 +269,7 @@ lock_backup(pgBackup *backup, bool strict, bool exclusive)
267269
*/
268270
if (!backup_lock_exit_hook_registered)
269271
{
270-
atexit(unlink_lock_atexit);
272+
pgut_atexit_push(unlink_lock_atexit,NULL);
271273
backup_lock_exit_hook_registered= true;
272274
}
273275

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp