Jeroen Demeyer on Thu, 10 Sep 2015 16:05:34 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
[PATCH] please make pari_sighandler public |
Hello,this patch is useful for applications which require switching between signal handlers (between PARI's handler and a private handler). It also allows more fine-grained control than INIT_SIGm to setting up signal handlers.
Thanks, Jeroen.
commit 6bb02b3a7b046e8dd940ccd43bdffb1c46efc5e3 Author: Jeroen Demeyer <jdemeyer@cage.ugent.be> Date: Thu Sep 10 15:55:37 2015 +0200 Make pari_sighandler public diff --git a/src/headers/paridecl.h b/src/headers/paridecl.h index 5f343f7..b17bced 100644 --- a/src/headers/paridecl.h +++ b/src/headers/paridecl.h @@ -3123,6 +3123,7 @@ char * pari_err2str(GEN err); void pari_init_opts(size_t parisize, ulong maxprime, ulong init_opts); void pari_init(size_t parisize, ulong maxprime); void pari_stackcheck_init(void *pari_stack_base); +void pari_sighandler(int sig); void pari_sig_init(void (*f)(int)); void pari_thread_alloc(struct pari_thread *t, size_t s, GEN arg); void pari_thread_close(void); diff --git a/src/language/init.c b/src/language/init.c index 5cab473..24a87d5 100644 --- a/src/language/init.c +++ b/src/language/init.c @@ -349,7 +349,6 @@ pari_daemon(void) /*********************************************************************/ static int try_to_recover = 0; THREAD VOLATILE int PARI_SIGINT_block = 0, PARI_SIGINT_pending = 0; -static void pari_sighandler(int sig); /*********************************************************************/ /* SIGNAL HANDLERS */ @@ -377,7 +376,7 @@ pari_handle_SIGINT(void) #endif } -static void +void pari_sighandler(int sig) { const char *msg;