Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
807605d0
Commit
807605d0
authored
Jun 28, 2010
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only catch all signals if os/signal package imported.
Fixes #776. R=rsc CC=golang-dev
https://golang.org/cl/1745041
parent
d4384ff7
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
27 additions
and
12 deletions
+27
-12
src/pkg/runtime/darwin/386/signal.c
src/pkg/runtime/darwin/386/signal.c
+3
-1
src/pkg/runtime/darwin/amd64/signal.c
src/pkg/runtime/darwin/amd64/signal.c
+3
-1
src/pkg/runtime/freebsd/386/signal.c
src/pkg/runtime/freebsd/386/signal.c
+3
-1
src/pkg/runtime/freebsd/amd64/signal.c
src/pkg/runtime/freebsd/amd64/signal.c
+3
-1
src/pkg/runtime/linux/386/signal.c
src/pkg/runtime/linux/386/signal.c
+3
-1
src/pkg/runtime/linux/amd64/signal.c
src/pkg/runtime/linux/amd64/signal.c
+3
-1
src/pkg/runtime/linux/arm/signal.c
src/pkg/runtime/linux/arm/signal.c
+3
-1
src/pkg/runtime/nacl/386/signal.c
src/pkg/runtime/nacl/386/signal.c
+1
-1
src/pkg/runtime/runtime.c
src/pkg/runtime/runtime.c
+1
-1
src/pkg/runtime/runtime.h
src/pkg/runtime/runtime.h
+1
-1
src/pkg/runtime/sigqueue.goc
src/pkg/runtime/sigqueue.goc
+1
-0
src/pkg/runtime/tiny/thread.c
src/pkg/runtime/tiny/thread.c
+1
-1
src/pkg/runtime/windows/386/signal.c
src/pkg/runtime/windows/386/signal.c
+1
-1
No files found.
src/pkg/runtime/darwin/386/signal.c
View file @
807605d0
...
...
@@ -129,7 +129,7 @@ signalstack(byte *p, int32 n)
}
void
initsig
(
void
)
initsig
(
int32
queue
)
{
int32
i
;
static
Sigaction
sa
;
...
...
@@ -141,6 +141,8 @@ initsig(void)
sa
.
sa_tramp
=
sigtramp
;
// sigtramp's job is to call into real handler
for
(
i
=
0
;
i
<
NSIG
;
i
++
)
{
if
(
sigtab
[
i
].
flags
)
{
if
((
sigtab
[
i
].
flags
&
SigQueue
)
!=
queue
)
continue
;
if
(
sigtab
[
i
].
flags
&
(
SigCatch
|
SigQueue
))
{
sa
.
__sigaction_u
.
__sa_sigaction
=
sighandler
;
}
else
{
...
...
src/pkg/runtime/darwin/amd64/signal.c
View file @
807605d0
...
...
@@ -138,7 +138,7 @@ signalstack(byte *p, int32 n)
}
void
initsig
(
void
)
initsig
(
int32
queue
)
{
int32
i
;
static
Sigaction
sa
;
...
...
@@ -150,6 +150,8 @@ initsig(void)
sa
.
sa_tramp
=
sigtramp
;
// sigtramp's job is to call into real handler
for
(
i
=
0
;
i
<
NSIG
;
i
++
)
{
if
(
sigtab
[
i
].
flags
)
{
if
((
sigtab
[
i
].
flags
&
SigQueue
)
!=
queue
)
continue
;
if
(
sigtab
[
i
].
flags
&
(
SigCatch
|
SigQueue
))
{
sa
.
__sigaction_u
.
__sa_sigaction
=
sighandler
;
}
else
{
...
...
src/pkg/runtime/freebsd/386/signal.c
View file @
807605d0
...
...
@@ -124,7 +124,7 @@ signalstack(byte *p, int32 n)
}
void
initsig
(
void
)
initsig
(
int32
queue
)
{
static
Sigaction
sa
;
...
...
@@ -136,6 +136,8 @@ initsig(void)
for
(
i
=
0
;
i
<
NSIG
;
i
++
)
{
if
(
sigtab
[
i
].
flags
)
{
if
((
sigtab
[
i
].
flags
&
SigQueue
)
!=
queue
)
continue
;
if
(
sigtab
[
i
].
flags
&
(
SigCatch
|
SigQueue
))
sa
.
__sigaction_u
.
__sa_sigaction
=
(
void
*
)
sigtramp
;
else
...
...
src/pkg/runtime/freebsd/amd64/signal.c
View file @
807605d0
...
...
@@ -132,7 +132,7 @@ signalstack(byte *p, int32 n)
}
void
initsig
(
void
)
initsig
(
int32
queue
)
{
static
Sigaction
sa
;
...
...
@@ -144,6 +144,8 @@ initsig(void)
for
(
i
=
0
;
i
<
NSIG
;
i
++
)
{
if
(
sigtab
[
i
].
flags
)
{
if
((
sigtab
[
i
].
flags
&
SigQueue
)
!=
queue
)
continue
;
if
(
sigtab
[
i
].
flags
&
(
SigCatch
|
SigQueue
))
sa
.
__sigaction_u
.
__sa_sigaction
=
(
void
*
)
sigtramp
;
else
...
...
src/pkg/runtime/linux/386/signal.c
View file @
807605d0
...
...
@@ -116,7 +116,7 @@ signalstack(byte *p, int32 n)
}
void
initsig
(
void
)
initsig
(
int32
queue
)
{
static
Sigaction
sa
;
...
...
@@ -128,6 +128,8 @@ initsig(void)
sa
.
sa_restorer
=
(
void
*
)
sigreturn
;
for
(
i
=
0
;
i
<
NSIG
;
i
++
)
{
if
(
sigtab
[
i
].
flags
)
{
if
((
sigtab
[
i
].
flags
&
SigQueue
)
!=
queue
)
continue
;
if
(
sigtab
[
i
].
flags
&
(
SigCatch
|
SigQueue
))
sa
.
k_sa_handler
=
(
void
*
)
sigtramp
;
else
...
...
src/pkg/runtime/linux/amd64/signal.c
View file @
807605d0
...
...
@@ -126,7 +126,7 @@ signalstack(byte *p, int32 n)
}
void
initsig
(
void
)
initsig
(
int32
queue
)
{
static
Sigaction
sa
;
...
...
@@ -138,6 +138,8 @@ initsig(void)
sa
.
sa_restorer
=
(
void
*
)
sigreturn
;
for
(
i
=
0
;
i
<
NSIG
;
i
++
)
{
if
(
sigtab
[
i
].
flags
)
{
if
((
sigtab
[
i
].
flags
&
SigQueue
)
!=
queue
)
continue
;
if
(
sigtab
[
i
].
flags
&
(
SigCatch
|
SigQueue
))
sa
.
sa_handler
=
(
void
*
)
sigtramp
;
else
...
...
src/pkg/runtime/linux/arm/signal.c
View file @
807605d0
...
...
@@ -120,7 +120,7 @@ signalstack(byte *p, int32 n)
}
void
initsig
(
void
)
initsig
(
int32
queue
)
{
static
Sigaction
sa
;
...
...
@@ -133,6 +133,8 @@ initsig(void)
sa
.
sa_restorer
=
(
void
*
)
sigreturn
;
for
(
i
=
0
;
i
<
NSIG
;
i
++
)
{
if
(
sigtab
[
i
].
flags
)
{
if
((
sigtab
[
i
].
flags
&
SigQueue
)
!=
queue
)
continue
;
if
(
sigtab
[
i
].
flags
&
(
SigCatch
|
SigQueue
))
sa
.
sa_handler
=
(
void
*
)
sigtramp
;
else
...
...
src/pkg/runtime/nacl/386/signal.c
View file @
807605d0
...
...
@@ -8,7 +8,7 @@
#include "os.h"
void
initsig
(
void
)
initsig
(
int32
queue
)
{
}
src/pkg/runtime/runtime.c
View file @
807605d0
...
...
@@ -278,7 +278,7 @@ check(void)
if
(
z
!=
4
)
throw
(
"cas4"
);
initsig
();
initsig
(
0
);
}
/*
...
...
src/pkg/runtime/runtime.h
View file @
807605d0
...
...
@@ -389,7 +389,7 @@ String catstring(String, String);
String
gostring
(
byte
*
);
String
gostringnocopy
(
byte
*
);
String
gostringw
(
uint16
*
);
void
initsig
(
void
);
void
initsig
(
int32
);
int32
gotraceback
(
void
);
void
traceback
(
uint8
*
pc
,
uint8
*
sp
,
uint8
*
lr
,
G
*
gp
);
void
tracebackothers
(
G
*
);
...
...
src/pkg/runtime/sigqueue.goc
View file @
807605d0
...
...
@@ -94,5 +94,6 @@ func Signame(sig int32) (name String) {
}
func
Siginit
()
{
initsig
(
SigQueue
);
sig
.
inuse
=
true
;
//
enable
reception
of
signals
;
cannot
disable
}
src/pkg/runtime/tiny/thread.c
View file @
807605d0
...
...
@@ -17,7 +17,7 @@ osinit(void)
}
void
initsig
(
void
)
initsig
(
int32
queue
)
{
}
...
...
src/pkg/runtime/windows/386/signal.c
View file @
807605d0
...
...
@@ -3,6 +3,6 @@
// license that can be found in the LICENSE file.
void
initsig
(
void
)
initsig
(
int32
queue
)
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment