mirror of
https://github.com/golang/go
synced 2024-11-21 22:54:40 -07:00
runtime: use startpanic so that only one thread handles an incoming SIGQUIT
Typing ^\ delivers the SIGQUIT to all threads, it appears. R=golang-dev, r, iant CC=golang-dev https://golang.org/cl/5657044
This commit is contained in:
parent
0995aba983
commit
55a54691f9
@ -92,9 +92,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG){
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
@ -102,9 +102,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG){
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
@ -89,9 +89,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG)
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
@ -97,9 +97,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG)
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
@ -85,9 +85,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG)
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
@ -95,9 +95,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG)
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
@ -85,9 +85,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG)
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
@ -94,9 +94,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG)
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
@ -85,9 +85,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG)
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
@ -94,9 +94,7 @@ runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp)
|
||||
return;
|
||||
|
||||
Throw:
|
||||
if(runtime·panicking) // traceback already printed
|
||||
runtime·exit(2);
|
||||
runtime·panicking = 1;
|
||||
runtime·startpanic();
|
||||
|
||||
if(sig < 0 || sig >= NSIG)
|
||||
runtime·printf("Signal %d\n", sig);
|
||||
|
Loading…
Reference in New Issue
Block a user