Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
47d8dab2
Commit
47d8dab2
authored
May 11, 2012
by
antirez
Browse files
redis-cli pipe mode: handle EINTR properly as well so that SIGSTOP/SIGCONT are handled correctly.
parent
b0744617
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
47d8dab2
...
...
@@ -919,7 +919,7 @@ static void pipeMode(void) {
/* Read from socket and feed the hiredis reader. */
do
{
nread
=
read
(
fd
,
ibuf
,
sizeof
(
ibuf
));
if
(
nread
==
-
1
&&
errno
!=
EAGAIN
)
{
if
(
nread
==
-
1
&&
errno
!=
EAGAIN
&&
errno
!=
EINTR
)
{
fprintf
(
stderr
,
"Error reading from the server: %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
...
...
@@ -962,7 +962,7 @@ static void pipeMode(void) {
ssize_t
nwritten
=
write
(
fd
,
obuf
+
obuf_pos
,
obuf_len
);
if
(
nwritten
==
-
1
)
{
if
(
errno
!=
EAGAIN
)
{
if
(
errno
!=
EAGAIN
&&
errno
!=
EINTR
)
{
fprintf
(
stderr
,
"Error writing to the server: %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
...
...
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