Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
5632e02d
Commit
5632e02d
authored
Jan 12, 2013
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore all SIGPIPE
parent
4526eb58
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
assets/shadowsocks
assets/shadowsocks
+0
-0
jni/shadowsocks/local.c
jni/shadowsocks/local.c
+6
-4
jni/termExec.cpp
jni/termExec.cpp
+5
-0
libs/armeabi/libexec.so
libs/armeabi/libexec.so
+0
-0
No files found.
assets/shadowsocks
View file @
5632e02d
No preview for this file type
jni/shadowsocks/local.c
View file @
5632e02d
...
...
@@ -157,7 +157,7 @@ static void server_recv_cb (EV_P_ ev_io *w, int revents) {
response
.
ver
=
VERSION
;
response
.
method
=
0
;
char
*
send_buf
=
(
char
*
)
&
response
;
send
(
server
->
fd
,
send_buf
,
sizeof
(
response
),
MSG_NOSIGNAL
);
send
(
server
->
fd
,
send_buf
,
sizeof
(
response
),
0
);
server
->
stage
=
1
;
return
;
}
else
if
(
server
->
stage
==
1
)
{
...
...
@@ -171,7 +171,7 @@ static void server_recv_cb (EV_P_ ev_io *w, int revents) {
response
.
rsv
=
0
;
response
.
atyp
=
1
;
char
*
send_buf
=
(
char
*
)
&
response
;
send
(
server
->
fd
,
send_buf
,
4
,
MSG_NOSIGNAL
);
send
(
server
->
fd
,
send_buf
,
4
,
0
);
close_and_free_remote
(
EV_A_
remote
);
close_and_free_server
(
EV_A_
server
);
return
;
...
...
@@ -225,7 +225,7 @@ static void server_recv_cb (EV_P_ ev_io *w, int revents) {
=
(
unsigned
short
)
htons
(
atoi
(
_remote_port
));
int
reply_size
=
4
+
sizeof
(
struct
in_addr
)
+
sizeof
(
unsigned
short
);
int
r
=
send
(
server
->
fd
,
server
->
buf
,
reply_size
,
MSG_NOSIGNAL
);
int
r
=
send
(
server
->
fd
,
server
->
buf
,
reply_size
,
0
);
if
(
r
<
reply_size
)
{
LOGE
(
"header not complete sent
\n
"
);
close_and_free_remote
(
EV_A_
remote
);
...
...
@@ -334,7 +334,7 @@ static void remote_recv_cb (EV_P_ ev_io *w, int revents) {
}
}
decrypt
(
server
->
buf
,
r
,
server
->
d_ctx
);
int
w
=
send
(
server
->
fd
,
server
->
buf
,
r
,
MSG_NOSIGNAL
);
int
w
=
send
(
server
->
fd
,
server
->
buf
,
r
,
0
);
if
(
w
<
0
)
{
if
(
errno
==
EAGAIN
)
{
// no data, wait for send
...
...
@@ -670,6 +670,8 @@ int main (int argc, char **argv)
fclose
(
file
);
}
signal
(
SIGPIPE
,
SIG_IGN
);
// init global variables
_server
=
strdup
(
server
);
_remote_port
=
strdup
(
remote_port
);
...
...
jni/termExec.cpp
View file @
5632e02d
...
...
@@ -121,6 +121,8 @@ static int create_subprocess(const int rdt, const char *cmd, char *const argv[],
if
(
pid
==
0
){
signal
(
SIGPIPE
,
SIG_IGN
);
if
(
envp
)
{
for
(;
*
envp
;
++
envp
)
{
putenv
(
*
envp
);
...
...
@@ -145,6 +147,9 @@ static int create_subprocess(const int rdt, const char *cmd, char *const argv[],
exit
(
0
);
}
else
{
signal
(
SIGPIPE
,
SIG_IGN
);
*
pProcessId
=
(
int
)
pid
;
dup2
(
pfds
[
1
],
1
);
...
...
libs/armeabi/libexec.so
View file @
5632e02d
No preview for this file type
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