cmd: s/write()/lxc_write_nointr()/g

parent 30c44936
...@@ -312,7 +312,7 @@ static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data, ...@@ -312,7 +312,7 @@ static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data,
} }
for (i = 0; i < mon->clientfds_cnt; i++) { for (i = 0; i < mon->clientfds_cnt; i++) {
ret = write(mon->clientfds[i], &msglxc, sizeof(msglxc)); ret = lxc_write_nointr(mon->clientfds[i], &msglxc, sizeof(msglxc));
if (ret < 0) if (ret < 0)
SYSERROR("Failed to send message to client file descriptor %d", SYSERROR("Failed to send message to client file descriptor %d",
mon->clientfds[i]); mon->clientfds[i]);
...@@ -428,7 +428,7 @@ int main(int argc, char *argv[]) ...@@ -428,7 +428,7 @@ int main(int argc, char *argv[])
* if-empty-statement construct is to quiet the * if-empty-statement construct is to quiet the
* warn-unused-result warning. * warn-unused-result warning.
*/ */
if (write(pipefd, "S", 1)) if (lxc_write_nointr(pipefd, "S", 1))
; ;
close(pipefd); close(pipefd);
......
...@@ -379,7 +379,7 @@ int main(int argc, char *argv[]) ...@@ -379,7 +379,7 @@ int main(int argc, char *argv[])
return 1; return 1;
} }
buf[0] = '1'; buf[0] = '1';
if (write(pipe_fds1[1], buf, 1) < 1) { if (lxc_write_nointr(pipe_fds1[1], buf, 1) < 1) {
perror("write pipe"); perror("write pipe");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
...@@ -409,7 +409,7 @@ int main(int argc, char *argv[]) ...@@ -409,7 +409,7 @@ int main(int argc, char *argv[])
if (lxc_map_ids(&active_map, pid)) if (lxc_map_ids(&active_map, pid))
fprintf(stderr, "error mapping child\n"); fprintf(stderr, "error mapping child\n");
if (write(pipe_fds2[1], buf, 1) < 0) { if (lxc_write_nointr(pipe_fds2[1], buf, 1) < 0) {
perror("write to pipe"); perror("write to pipe");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment