1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Replace file locking by the new portable dotlock code.

* include/dotlock.h: New.  From current gnupg master.
* util/dotlock.c: Ditto.  Include util.h.  The major changes done in
master are: Factor Unix and W32 specific code out into specific
functions.  Define HAVE_POSIX_SYSTEM.  Rearrange some functions.
(disable_dotlock): Rename to dotlock_disable.
(create_dotlock): Rename to dotlock_create and add a dummy arg.
(destroy_dotlock): Rename to dotlock_destroy.
(make_dotlock): Rename to dotlock_take.
(release_dotlock): Rename to dotlock_release.
(remove_lockfiles): Rename to dotlock_remove_lockfiles.
This commit is contained in:
Werner Koch 2012-01-10 15:16:44 +01:00
parent dccdcef319
commit b9333cd890
10 changed files with 1432 additions and 643 deletions

View file

@ -66,7 +66,7 @@ init_one_signal (int sig, RETSIGTYPE (*handler)(int), int check_ign )
sigemptyset (&nact.sa_mask);
nact.sa_flags = 0;
sigaction ( sig, &nact, NULL);
#else
#else
RETSIGTYPE (*ohandler)(int);
ohandler = signal (sig, handler);
@ -122,7 +122,7 @@ got_fatal_signal( int sig )
/* Reset action to default action and raise signal again. */
init_one_signal (sig, SIG_DFL, 0);
remove_lockfiles ();
dotlock_remove_lockfiles ();
#ifdef __riscos__
riscos_close_fds ();
#endif /* __riscos__ */
@ -165,7 +165,7 @@ pause_on_sigusr( int which )
sigsuspend( &oldmask );
caught_sigusr1 = 0;
sigprocmask( SIG_UNBLOCK, &mask, NULL );
#else
#else
assert (which == 1);
sighold (SIGUSR1);
while (!caught_sigusr1)