bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] already connected when closed


From: Karl Berry
Subject: Re: [bug-inetutils] already connected when closed
Date: Thu, 5 Jul 2007 13:31:00 -0500

    Been trying to reproduce this, but I cannot, admitably I'm using CVS

I checked out inetutils from CVS.
The sigpipe still happens for me on my machine after letting the
connection silently time out -- not 100% of the time, but >90%.  I'll
append the backtrace, not that it's especially illuminating.  The
sigpipe happens in the `fflush (cout);' call in the `command' function.

(BTW 1, I don't see a bootstrap script, just bootstrap.conf, but I
copied bootstrap from coreutils and that seemed to get things going.

BTW 2, shouldn't there be Copyright 2007 Free Software Foundation (or
whatever) added to the copyright notices?)

I tried checking if fstat succeeds (all I could think of), but
apparently it does, even though the stream is obviously closed.  Sigh.
Is there a better way to check?  Or maybe the thing to do is ignore
SIGPIPE for this command?  Yikes.

I tried on another host with the same libc and kernel and it worked :(.
Guess it's something about my terribly (satellite) connection here.  I
could offer to give you access but I fear it will be unusably slow
for debugging coming in from outside. 

Here is the bit of code I tried with in setpeer most recently:

  struct stat stbuf;

  if (connected && (fstat (fileno (cout), &stbuf) < 0
                    || command ("NOOP") != COMPLETE)) {
    disconnect (0, 0);
  } else if (connected) {
    printf ("Already connected to %s, use close first.\n", hostname);
    code = -1;
    return;
  }

Thanks,
k

#0  0xb7f6f098 in write () from /lib/libc.so.6
#1  0xb7fdcff4 in ?? () from /lib/libc.so.6
#2  0xb7f133f2 in _IO_new_file_write () from /lib/libc.so.6
#3  0xb7f11e2b in _IO_new_do_write () from /lib/libc.so.6
#4  0xb7f12ab2 in _IO_new_file_sync () from /lib/libc.so.6
#5  0xb7f07f53 in fflush () from /lib/libc.so.6
#6  0x0804f78b in command (fmt=0x805735a "NOOP") at ftp.c:387
#7  0x0804a09a in setpeer (argc=2, argv=0x805de60) at cmds.c:172
#8  0x08052fef in cmdscanner (top=1) at main.c:375
#9  0x08052d73 in main (argc=1, argv=0xbfffe478) at main.c:232




reply via email to

[Prev in Thread] Current Thread [Next in Thread]