diff options
author | Mattias Andrée <maandree@kth.se> | 2021-09-04 11:41:21 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-09-04 11:41:38 +0200 |
commit | fc2201769e850bca4b718305a1f8e776f5d0786b (patch) | |
tree | e37090b9b1cde35a208604e45df6efb0a68feb41 /editasroot.c | |
parent | Communicate whether file transfers were completed (diff) | |
download | editasroot-fc2201769e850bca4b718305a1f8e776f5d0786b.tar.gz editasroot-fc2201769e850bca4b718305a1f8e776f5d0786b.tar.bz2 editasroot-fc2201769e850bca4b718305a1f8e776f5d0786b.tar.xz |
Use MSG_PEEK instead of sending unnecessary data
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'editasroot.c')
-rw-r--r-- | editasroot.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/editasroot.c b/editasroot.c index 09479f8..0a092cd 100644 --- a/editasroot.c +++ b/editasroot.c @@ -230,12 +230,6 @@ main(int argc, char *argv[]) /* Start file editor */ run_editor(editor, path, fds[0]); - /* Signal to child that editor exited as expected */ - if (write(fds[0], &(char){1}, 1) != 1) { - fprintf(stderr, "%s: write <socket to child>: %s", argv0, strerror(errno)); - exit(1); - } - /* Rewrite file from tmpfile and unlink tmpfile */ fd = open(path, O_RDONLY); if (fd < 0) { |