Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
8a5b6f2b
Commit
8a5b6f2b
authored
Feb 10, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Block all signals in daemon
parent
71ecbb3a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
daemon.cpp
native/jni/core/daemon.cpp
+2
-10
No files found.
native/jni/core/daemon.cpp
View file @
8a5b6f2b
...
@@ -134,19 +134,11 @@ static void main_daemon() {
...
@@ -134,19 +134,11 @@ static void main_daemon() {
// Change process name
// Change process name
strcpy
(
argv0
,
"magiskd"
);
strcpy
(
argv0
,
"magiskd"
);
// Block all
user
signals
// Block all signals
sigset_t
block_set
;
sigset_t
block_set
;
sigemptyset
(
&
block_set
);
sigfillset
(
&
block_set
);
sigaddset
(
&
block_set
,
SIGUSR1
);
sigaddset
(
&
block_set
,
SIGUSR2
);
pthread_sigmask
(
SIG_SETMASK
,
&
block_set
,
nullptr
);
pthread_sigmask
(
SIG_SETMASK
,
&
block_set
,
nullptr
);
// Ignore SIGPIPE
struct
sigaction
act
;
memset
(
&
act
,
0
,
sizeof
(
act
));
act
.
sa_handler
=
SIG_IGN
;
sigaction
(
SIGPIPE
,
&
act
,
nullptr
);
// Loop forever to listen for requests
// Loop forever to listen for requests
while
(
true
)
{
while
(
true
)
{
int
*
client
=
new
int
;
int
*
client
=
new
int
;
...
...
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