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

windoze version works again

This commit is contained in:
Werner Koch 1998-10-06 12:10:02 +00:00
parent 6f73ec963a
commit f04db56311
27 changed files with 803 additions and 409 deletions

View file

@ -45,7 +45,7 @@ signal_name( int signum )
return sys_siglist[signum];
#else
static char buf[20];
sprintf( "signal %d", signum );
sprintf(buf, "signal %d", signum );
return buf;
#endif
}
@ -70,7 +70,7 @@ got_usr_signal( int sig )
caught_sigusr1 = 1;
}
#ifndef __MINGW32__
static void
do_sigaction( int sig, struct sigaction *nact )
{
@ -80,10 +80,12 @@ do_sigaction( int sig, struct sigaction *nact )
if( oact.sa_handler != SIG_IGN )
sigaction( sig, nact, NULL);
}
#endif
void
init_signals()
{
#ifndef __MINGW32__
struct sigaction nact;
nact.sa_handler = got_fatal_signal;
@ -97,12 +99,14 @@ init_signals()
do_sigaction( SIGSEGV, &nact );
nact.sa_handler = got_usr_signal;
sigaction( SIGUSR1, &nact, NULL );
#endif
}
void
pause_on_sigusr( int which )
{
#ifndef __MINGW32__
sigset_t mask, oldmask;
assert( which == 1 );
@ -114,5 +118,6 @@ pause_on_sigusr( int which )
sigsuspend( &oldmask );
caught_sigusr1 = 0;
sigprocmask( SIG_UNBLOCK, &mask, NULL );
#endif
}