@@ -322,7 +322,7 @@ static void setup_trampoline(void)
322
322
trampolinestacksize = PTHREAD_STACK_MIN ;
323
323
#endif
324
324
trampolinestack = malloc (trampolinestacksize + 4096 );
325
- if (!trampolinestack ) {perror ("malloc" ); exit (1 );}
325
+ if (!trampolinestack ) {perror ("cysignals malloc" ); exit (1 );}
326
326
327
327
/* Align trampolinestack on a multiple of 4096 bytes.
328
328
* This seems to be needed in particular on OS X. */
@@ -331,14 +331,14 @@ static void setup_trampoline(void)
331
331
trampolinestack = (void * )addr ;
332
332
333
333
ret = pthread_attr_init (& attr );
334
- if (ret ) {errno = ret ; perror ("pthread_attr_init" ); exit (1 );}
334
+ if (ret ) {errno = ret ; perror ("cysignals pthread_attr_init" ); exit (1 );}
335
335
ret = pthread_attr_setstack (& attr , trampolinestack , trampolinestacksize );
336
- if (ret ) {errno = ret ; perror ("pthread_attr_setstack" ); exit (1 );}
336
+ if (ret ) {errno = ret ; perror ("cysignals pthread_attr_setstack" ); exit (1 );}
337
337
ret = pthread_create (& child , & attr , _sig_on_trampoline , NULL );
338
- if (ret ) {errno = ret ; perror ("pthread_create" ); exit (1 );}
338
+ if (ret ) {errno = ret ; perror ("cysignals pthread_create" ); exit (1 );}
339
339
pthread_attr_destroy (& attr );
340
340
ret = pthread_join (child , NULL );
341
- if (ret ) {errno = ret ; perror ("pthread_join" ); exit (1 );}
341
+ if (ret ) {errno = ret ; perror ("cysignals pthread_join" ); exit (1 );}
342
342
343
343
if (cysetjmp (cysigs .env ) == 0 )
344
344
{
@@ -433,7 +433,7 @@ static void setup_alt_stack(void)
433
433
ss .ss_sp = alt_stack ;
434
434
ss .ss_size = sizeof (alt_stack );
435
435
ss .ss_flags = 0 ;
436
- if (sigaltstack (& ss , NULL ) == -1 ) {perror ("sigaltstack" ); exit (1 );}
436
+ if (sigaltstack (& ss , NULL ) == -1 ) {perror ("cysignals sigaltstack" ); exit (1 );}
437
437
#endif
438
438
#if defined(__CYGWIN__ ) && defined(__x86_64__ )
439
439
cygwin_setup_alt_stack ();
@@ -470,21 +470,21 @@ static void setup_cysignals_handlers(void)
470
470
/* Handlers for interrupt-like signals */
471
471
sa .sa_handler = cysigs_interrupt_handler ;
472
472
sa .sa_flags = 0 ;
473
- if (sigaction (SIGHUP , & sa , NULL )) {perror ("sigaction" ); exit (1 );}
474
- if (sigaction (SIGINT , & sa , NULL )) {perror ("sigaction" ); exit (1 );}
475
- if (sigaction (SIGALRM , & sa , NULL )) {perror ("sigaction" ); exit (1 );}
473
+ if (sigaction (SIGHUP , & sa , NULL )) {perror ("cysignals sigaction" ); exit (1 );}
474
+ if (sigaction (SIGINT , & sa , NULL )) {perror ("cysignals sigaction" ); exit (1 );}
475
+ if (sigaction (SIGALRM , & sa , NULL )) {perror ("cysignals sigaction" ); exit (1 );}
476
476
477
477
/* Handlers for critical signals */
478
478
sa .sa_handler = cysigs_signal_handler ;
479
479
/* Allow signals during signal handling, we have code to deal with
480
480
* this case. */
481
481
sa .sa_flags = SA_NODEFER | SA_ONSTACK ;
482
- if (sigaction (SIGQUIT , & sa , NULL )) {perror ("sigaction" ); exit (1 );}
483
- if (sigaction (SIGILL , & sa , NULL )) {perror ("sigaction" ); exit (1 );}
484
- if (sigaction (SIGABRT , & sa , NULL )) {perror ("sigaction" ); exit (1 );}
485
- if (sigaction (SIGFPE , & sa , NULL )) {perror ("sigaction" ); exit (1 );}
486
- if (sigaction (SIGBUS , & sa , NULL )) {perror ("sigaction" ); exit (1 );}
487
- if (sigaction (SIGSEGV , & sa , NULL )) {perror ("sigaction" ); exit (1 );}
482
+ if (sigaction (SIGQUIT , & sa , NULL )) {perror ("cysignals sigaction" ); exit (1 );}
483
+ if (sigaction (SIGILL , & sa , NULL )) {perror ("cysignals sigaction" ); exit (1 );}
484
+ if (sigaction (SIGABRT , & sa , NULL )) {perror ("cysignals sigaction" ); exit (1 );}
485
+ if (sigaction (SIGFPE , & sa , NULL )) {perror ("cysignals sigaction" ); exit (1 );}
486
+ if (sigaction (SIGBUS , & sa , NULL )) {perror ("cysignals sigaction" ); exit (1 );}
487
+ if (sigaction (SIGSEGV , & sa , NULL )) {perror ("cysignals sigaction" ); exit (1 );}
488
488
}
489
489
490
490
@@ -531,7 +531,7 @@ static void print_enhanced_backtrace(void)
531
531
if (pid < 0 )
532
532
{
533
533
/* Failed to fork: no problem, just ignore */
534
- perror ("fork" );
534
+ perror ("cysignals fork" );
535
535
return ;
536
536
}
537
537
@@ -554,7 +554,7 @@ static void print_enhanced_backtrace(void)
554
554
argv [3 ] = pid_str ;
555
555
argv [4 ] = NULL ;
556
556
execvp (path , argv );
557
- perror ("Failed to execute cysignals-CSI" );
557
+ perror ("cysignals failed to execute cysignals-CSI" );
558
558
exit (2 );
559
559
}
560
560
/* Wait for cysignals-CSI to finish */
0 commit comments