This is the mail archive of the
mailing list for the Cygwin project.
Re: connect patch
On Thu, Feb 07, 2002 at 09:44:36AM -0500, Jason Tishler wrote:
> On Thu, Feb 07, 2002 at 02:56:25PM +0100, Corinna Vinschen wrote:
> > On Wed, Feb 06, 2002 at 01:07:28PM -0500, Jason Tishler wrote:
> > > Was this the right thing to do?
> > The patch isn't correct since it now calls fdsock() twice which allocates
> > a new fhandler even if the line before already had created one.
> > Better:
> > fhandler_socket* res_fh = fdsock (fd, name, soc)->set_addr_family (af);
> > if (af == AF_LOCAL)
> > res_fh->set_sun_path (name);
> Oops, I thought that the second call would only return a pointer to the
> previously created fhandler.
> > However, I don't understand the need for that patch. Does postgresql
> > call getsockname() before calling bind()?
> I don't know, but I guess that it does.
> > So, IMO, the correct way is to clean up cygwin_getsockname()
> > so that it always returns "something" instead of SEGVing.
> > Could you please test the below patch if that works with postgresql?
> The above works great!
Thanks for the quick reply. I've checked it in.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:firstname.lastname@example.org
Red Hat, Inc.