From: Nick Ing-Simmons Date: Thu, 18 Jan 2001 21:48:02 +0000 (+0000) Subject: Win32 "safe signals" co-existance fix. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=66fe0623488f98a7806a1e9f1451648932318696;p=p5sagit%2Fp5-mst-13.2.git Win32 "safe signals" co-existance fix. Fix SIG_SIZE value. Clear PL_sig_pending when cloning (fork). p4raw-id: //depot/perlio@8475 --- diff --git a/sv.c b/sv.c index 5f3284d..c14809b 100644 --- a/sv.c +++ b/sv.c @@ -8440,6 +8440,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_scopestack = 0; PL_savestack = 0; PL_retstack = 0; + PL_sig_pending = 0; # else /* !DEBUGGING */ Zero(my_perl, 1, PerlInterpreter); # endif /* DEBUGGING */ @@ -8466,6 +8467,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_scopestack = 0; PL_savestack = 0; PL_retstack = 0; + PL_sig_pending = 0; # else /* !DEBUGGING */ Zero(my_perl, 1, PerlInterpreter); # endif /* DEBUGGING */ @@ -8865,10 +8867,16 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_uudmap['M'] = 0; /* reinits on demand */ PL_bitcount = Nullch; /* reinits on demand */ + if (proto_perl->Ipsig_pend) { + Newz(0, PL_psig_pend, SIG_SIZE, int); + } + else { + PL_psig_pend = (int*)NULL; + } + if (proto_perl->Ipsig_ptr) { Newz(0, PL_psig_ptr, SIG_SIZE, SV*); Newz(0, PL_psig_name, SIG_SIZE, SV*); - Newz(0, PL_psig_pend, SIG_SIZE, int); for (i = 1; i < SIG_SIZE; i++) { PL_psig_ptr[i] = sv_dup_inc(proto_perl->Ipsig_ptr[i]); PL_psig_name[i] = sv_dup_inc(proto_perl->Ipsig_name[i]); @@ -8877,7 +8885,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, else { PL_psig_ptr = (SV**)NULL; PL_psig_name = (SV**)NULL; - PL_psig_pend = (int*)NULL; } /* thrdvar.h stuff */ diff --git a/win32/config.bc b/win32/config.bc index caefd33..ec4a09e 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -694,7 +694,7 @@ sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PI sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0' sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 18 0' sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0' -sig_size='28' +sig_size='27' signal_t='void' sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' diff --git a/win32/config.gc b/win32/config.gc index 89539a6..c62ea71 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -694,7 +694,7 @@ sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PI sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0' sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 0' sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0' -sig_size='28' +sig_size='27' signal_t='void' sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' diff --git a/win32/config.vc b/win32/config.vc index 4c3c777..e770921 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -694,7 +694,7 @@ sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PI sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0' sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 0' sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0' -sig_size='28' +sig_size='27' signal_t='void' sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' diff --git a/win32/config_H.bc b/win32/config_H.bc index ca1d1ab..948dbd5 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -13,7 +13,7 @@ /* * Package name : perl5 * Source directory : - * Configuration time: Sat Jan 13 11:33:17 2001 + * Configuration time: Thu Jan 18 14:54:24 2001 * Configured by : nick * Target system : */ @@ -2933,8 +2933,13 @@ * The last element is 0, corresponding to the 0 at the end of * the sig_name list. */ +/* SIG_SIZE: + * This variable contains the number of elements of the sig_name + * and sig_num arrays, including the final NULL entry. + */ #define SIG_NAME "ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/ #define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0 /**/ +#define SIG_SIZE 27 /**/ /* SITEARCH: * This symbol contains the name of the private library for this package. diff --git a/win32/config_H.gc b/win32/config_H.gc index e38d2d3..49000c6 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -13,7 +13,7 @@ /* * Package name : perl5 * Source directory : - * Configuration time: Sat Jan 13 11:33:00 2001 + * Configuration time: Thu Jan 18 14:54:41 2001 * Configured by : nick * Target system : */ @@ -2933,8 +2933,13 @@ * The last element is 0, corresponding to the 0 at the end of * the sig_name list. */ +/* SIG_SIZE: + * This variable contains the number of elements of the sig_name + * and sig_num arrays, including the final NULL entry. + */ #define SIG_NAME "ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/ #define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0 /**/ +#define SIG_SIZE 27 /**/ /* SITEARCH: * This symbol contains the name of the private library for this package. diff --git a/win32/config_H.vc b/win32/config_H.vc index 6fd0c7a..299d237 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -13,7 +13,7 @@ /* * Package name : perl5 * Source directory : - * Configuration time: Sat Jan 13 11:32:32 2001 + * Configuration time: Thu Jan 18 14:54:56 2001 * Configured by : nick * Target system : */ @@ -2933,8 +2933,13 @@ * The last element is 0, corresponding to the 0 at the end of * the sig_name list. */ +/* SIG_SIZE: + * This variable contains the number of elements of the sig_name + * and sig_num arrays, including the final NULL entry. + */ #define SIG_NAME "ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/ #define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0 /**/ +#define SIG_SIZE 27 /**/ /* SITEARCH: * This symbol contains the name of the private library for this package.