- usb.c: fixed signal handling
- ccid.c: revised construction of RDR_to_PC_*-packages to make the code more readable git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@217 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -976,6 +976,9 @@ static void *interrupt (void *param)
|
||||
|
||||
pthread_cleanup_pop (1);
|
||||
|
||||
fflush (stdout);
|
||||
fflush (stderr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1534,15 +1537,17 @@ stall:
|
||||
|
||||
static void signothing (int sig, siginfo_t *info, void *ptr)
|
||||
{
|
||||
unsigned int seconds = 10;
|
||||
unsigned int seconds = 4;
|
||||
switch (sig) {
|
||||
case SIGQUIT:
|
||||
seconds /= 2;
|
||||
case SIGINT:
|
||||
if (verbose > 1)
|
||||
fprintf (stderr, "\nInitializing shutdown, "
|
||||
"waiting %d seconds for threads to terminate\n",
|
||||
seconds);
|
||||
sleep(5);
|
||||
case SIGQUIT:
|
||||
pthread_cancel(ep0);
|
||||
sleep(seconds);
|
||||
fprintf (stderr, "Doing immediate shutdown.\n");
|
||||
exit(1);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user