projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: handle EINTR for every read()
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index a3eef148810e3219d1978edeacfe1e2434d46690..47780e2660c59a22ccf3e32c88cf3dd7a98ef12d 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-1818,7
+1818,9
@@
int relay_add_connection(int fd, struct lttng_poll_event *events,
PERROR("Relay command zmalloc");
goto error;
}
PERROR("Relay command zmalloc");
goto error;
}
- ret = read(fd, relay_connection, sizeof(struct relay_command));
+ do {
+ ret = read(fd, relay_connection, sizeof(struct relay_command));
+ } while (ret < 0 && errno == EINTR);
if (ret < 0 || ret < sizeof(struct relay_command)) {
PERROR("read relay cmd pipe");
goto error_read;
if (ret < 0 || ret < sizeof(struct relay_command)) {
PERROR("read relay cmd pipe");
goto error_read;
This page took
0.023202 seconds
and
4
git commands to generate.