diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2019-12-18 16:07:38 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2019-12-21 18:27:36 +0000 |
commit | 847a015ae17b3fa66154088009803636f95b2c6f (patch) | |
tree | 844abef597c033245bd34b0136bc41f10618896a /src/OS | |
parent | 59da908cef70461b20f1f717689b490c248962f9 (diff) |
Gnu/Hurd: revert pipe-i/o EINTR handling changes
Diffstat (limited to 'src/OS')
-rw-r--r-- | src/OS/Makefile-Base | 6 | ||||
-rw-r--r-- | src/OS/os.c-GNU | 38 | ||||
-rw-r--r-- | src/OS/os.h-GNU | 6 |
3 files changed, 3 insertions, 47 deletions
diff --git a/src/OS/Makefile-Base b/src/OS/Makefile-Base index 1ab3ac35f..36af8308d 100644 --- a/src/OS/Makefile-Base +++ b/src/OS/Makefile-Base @@ -644,8 +644,7 @@ HDRS = blob.h \ mytypes.h \ sha_ver.h \ structs.h \ - os.h \ - osfunctions.h + os.h PHDRS = ../config.h \ ../dbfunctions.h \ ../dbstuff.h \ @@ -656,8 +655,7 @@ PHDRS = ../config.h \ ../macros.h \ ../mytypes.h \ ../structs.h \ - ../os.h \ - ../osfunctions.h + ../os.h .SUFFIXES: .o .c .c.o:; @echo "$(CC) $*.c" diff --git a/src/OS/os.c-GNU b/src/OS/os.c-GNU index a75166322..e5d6ff66c 100644 --- a/src/OS/os.c-GNU +++ b/src/OS/os.c-GNU @@ -52,42 +52,4 @@ return -1; } #endif /* OS_LOAD_AVERAGE */ - -ssize_t -os_pipe_read(int fd, void * buf, size_t count) -{ -int rc; -for (int retries = 10; retries > 0; retries--) - { - if ((rc = read(fd, buf, count)) >= 0) break; - if (rc != -1 || errno != EINTR) break; - } -return rc; -} - - -ssize_t -os_pipe_write(int fd, void * buf, size_t count) -{ -int rc; -for (int retries = 10; retries > 0; retries--) - { - if ((rc = write(fd, buf, count)) >= 0) break; - if (rc != -1 || errno != EINTR) break; - } -return rc; -} - -ssize_t -os_pipe_writev(int fd, const struct iovec * iov, int iovcnt) -{ -int rc; -for (int retries = 10; retries > 0; retries--) - { - if ((rc = writev(fd, iov, iovcnt)) >= 0) break; - if (rc != -1 || errno != EINTR) break; - } -return rc; -} - /* End of os.c-GNU */ diff --git a/src/OS/os.h-GNU b/src/OS/os.h-GNU index 772d278ad..1de2e3e84 100644 --- a/src/OS/os.h-GNU +++ b/src/OS/os.h-GNU @@ -21,11 +21,7 @@ typedef struct flock flock_t; #define ICONV_ARG2_TYPE const char ** /* setgroups(0, NULL) succeeds, and drops the gid group -as well as any supplementary groups */ +as well as any supplementary groups*/ #define OS_SETGROUPS_ZERO_DROPS_ALL -/* reads and writes on pipes frequently return EINTR. We provide -a routine to retry that */ -#define OS_PIPE_RW_EINTR - /* End */ |