protocol: use 2 pipe for read and write

This commit is contained in:
Shuanglei Tao
2021-02-06 00:19:07 +08:00
parent 5d1b86d2c5
commit 75105f6d48
4 changed files with 47 additions and 32 deletions

View File

@@ -74,13 +74,6 @@ int get_sig(const char *sig_name) {
return atoi(sig_name);
}
bool fd_set_cloexec(const int fd) {
int flags = fcntl(fd, F_GETFD);
if (flags < 0) return false;
return (flags & FD_CLOEXEC) == 0 ||
fcntl(fd, F_SETFD, flags | FD_CLOEXEC) != -1;
}
int open_uri(char *uri) {
#ifdef __APPLE__
char command[256];