Try doing this (somewhere) instead: signal (SIGPIPE, SIG_IGN);
Yep. I put that just before the NOOP, and now it works! I would guess
the handler should be saved and restored, but I'll leave that to you.
My diff from cvs below.
Thanks for persevering with me on this ...
karl
--- cmds.c 29 Jun 2007 16:29:34 -0000 1.33
+++ cmds.c 11 Jul 2007 21:46:55 -0000
@@ -170,6 +170,13 @@
int port;
- if (connected)
+ signal (SIGPIPE, SIG_IGN);
+ if (connected && command ("NOOP") != COMPLETE) {
disconnect (0, 0);
+ } else if (connected) {
+ printf ("Already connected to %s, use close first.\n", hostname);
+ code = -1;
+ return;
+ }
+
if (argc < 2)
another (&argc, &argv, "to");
_______________________________________________
bug-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-inetutils