From 947411367d78a0fcbecb21f47711bce31c5a0d08 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 11 Dec 2000 19:45:54 +0000 Subject: [PATCH] * net.cc (cygwin_rexec): Eliminate superfluous call to `set_socket_inheritance'. * include/sys/socket.h: Add SUS defines for option values to `shutdown'. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/include/sys/socket.h | 5 +++++ winsup/cygwin/net.cc | 6 ++---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 02a319de5..d28486f33 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +Tue Dec 5 17:06:00 2000 Corinna Vinschen + + * net.cc (cygwin_rexec): Eliminate superfluous call to + `set_socket_inheritance'. + * include/sys/socket.h: Add SUS defines for option values to `shutdown'. + Sun Dec 10 17:19:04 2000 Christopher Faylor * include/sysexits: New file. diff --git a/winsup/cygwin/include/sys/socket.h b/winsup/cygwin/include/sys/socket.h index 89b9af7f3..a13b55600 100644 --- a/winsup/cygwin/include/sys/socket.h +++ b/winsup/cygwin/include/sys/socket.h @@ -10,6 +10,11 @@ extern "C" { #endif +/* SUS symbolic values for the second parm to shutdown(2) */ +#define SHUT_RD 0 /* == Win32 SD_RECEIVE */ +#define SHUT_WR 1 /* == Win32 SD_SEND */ +#define SHUT_RDWR 2 /* == Win32 SD_BOTH */ + #ifndef __INSIDE_CYGWIN_NET__ int accept (int, struct sockaddr *__peer, int *); int bind (int, struct sockaddr *__my_addr, int __addrlen); diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 08d076a6d..65a68bedb 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1682,10 +1682,8 @@ cygwin_rexec (char **ahost, unsigned short inport, char *locuser, res = res_fd; } if (fd2p) - { - fd2s = set_socket_inheritance (fd2s); - fdsock (*fd2p, "/dev/tcp", fd2s); - } + fdsock (*fd2p, "/dev/tcp", fd2s); + done: syscall_printf ("%d = rexec (...)", res); return res;