Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Nov 2010 01:20:11 GMT
From:      Mark <markjdb@gmail.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/151866: [libfetch] [patch] closing the cached FTP connection
Message-ID:  <201011080120.oA81KBOA044218@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/151866; it has been noted by GNATS.

From: Mark <markjdb@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/151866: [libfetch] [patch] closing the cached FTP connection
Date: Sun, 7 Nov 2010 19:47:08 -0500

 An alternate (and better) solution to this problem was suggested by
 Nick Hibma on freebsd-current:
 
 diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
 index f5ae7ff..9dfbf3c 100644
 --- a/lib/libfetch/ftp.c
 +++ b/lib/libfetch/ftp.c
 @@ -992,6 +992,7 @@ ftp_connect(struct url *url, struct url *purl,
 const char *flags)
  	if ((e = ftp_authenticate(conn, url, purl)) != FTP_LOGGED_IN)
  		goto fouch;
 
 +	fcntl(conn->sd, F_SETFD, FD_CLOEXEC);
  	/* TODO: Request extended features supported, if any (RFC 3659). */
 
  	/* done */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011080120.oA81KBOA044218>