diff options
author | Ron Yorston <rmy@pobox.com> | 2018-03-15 15:35:24 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-03-15 15:35:24 +0000 |
commit | 701cea96c43d185ebe433df9ecca39ecc9742ef3 (patch) | |
tree | b9b0dcc699f5319f0055d5d29aded690ff37258b /networking | |
parent | 7cc082e2370da69c8783812c251190d316ce82b3 (diff) | |
download | busybox-w32-701cea96c43d185ebe433df9ecca39ecc9742ef3.tar.gz busybox-w32-701cea96c43d185ebe433df9ecca39ecc9742ef3.tar.bz2 busybox-w32-701cea96c43d185ebe433df9ecca39ecc9742ef3.zip |
win32: tidy up popen implementation
Make mingw_popen_fd sufficiently general that it can be used to
implement the other two popen routines.
mingw_popen now just creates a command line and passes it to
mingw_popen_fd. The one call to mingw_popen2 has been replaced
by a call to mingw_popen_fd.
Diffstat (limited to 'networking')
-rw-r--r-- | networking/wget.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/wget.c b/networking/wget.c index 776894dca..194bf457a 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -768,7 +768,6 @@ static void spawn_ssl_client(const char *host, int network_fd, int flags) | |||
768 | static void spawn_ssl_client(const char *host, int network_fd, int flags) | 768 | static void spawn_ssl_client(const char *host, int network_fd, int flags) |
769 | { | 769 | { |
770 | int fd1; | 770 | int fd1; |
771 | pid_t pid; | ||
772 | char *servername, *p, *cmd; | 771 | char *servername, *p, *cmd; |
773 | 772 | ||
774 | servername = xstrdup(host); | 773 | servername = xstrdup(host); |
@@ -781,7 +780,7 @@ static void spawn_ssl_client(const char *host, int network_fd, int flags) | |||
781 | (void *)_get_osfhandle(network_fd), servername, | 780 | (void *)_get_osfhandle(network_fd), servername, |
782 | flags & TLSLOOP_EXIT_ON_LOCAL_EOF ? " -e" : ""); | 781 | flags & TLSLOOP_EXIT_ON_LOCAL_EOF ? " -e" : ""); |
783 | 782 | ||
784 | if ( (fd1=mingw_popen2(cmd, &pid)) == -1 ) { | 783 | if ( (fd1=mingw_popen_fd(cmd, "b", -1, NULL)) == -1 ) { |
785 | bb_perror_msg_and_die("can't execute ssl_client"); | 784 | bb_perror_msg_and_die("can't execute ssl_client"); |
786 | } | 785 | } |
787 | 786 | ||