From owner-freebsd-questions@FreeBSD.ORG Mon Jul 19 14:21:18 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EAC2106567A for ; Mon, 19 Jul 2010 14:21:18 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id E17398FC14 for ; Mon, 19 Jul 2010 14:21:17 +0000 (UTC) Received: by fxm13 with SMTP id 13so2409760fxm.13 for ; Mon, 19 Jul 2010 07:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=Fd7yKBC15NtuapYH2OM/MsXqOjd0B1nJVxdUzAWXILc=; b=mm9mQsihNhdnUaGvY4amRyoK7JyzRvsUVZOt3HUGACO5tHgJT3v5ZXMI1RdIo90xUi UXO9Mphqk3S+OVf0/vcAoHjPq7D32dLxyEl5Vn9V/BhgeDfLDQrfo0rJEM5Hto+HYoP3 PlpNHAcXBECqmSGyFypzj4C+nkg66J2VnTLCM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=HN+3XEcJWj55E25nUEVnGafyvqEa1oM4W97UluY4dJjfWTHNoApNGLpR2Ya4ENWpFm bYtfdpJR6fGk1admnqEXr/Sb5n0I0fX5qFN3goR1b8qvPng2S4vTh3jo+2kdn9pqa3LT q+eGyvCz4V/YbKJjjpeFYsYhQzxAxhG2Xwd+w= Received: by 10.223.110.73 with SMTP id m9mr3814957fap.25.1279549276840; Mon, 19 Jul 2010 07:21:16 -0700 (PDT) Received: from localhost (anonymizer4.torservers.net [113.212.97.156]) by mx.google.com with ESMTPS id d15sm755455faa.3.2010.07.19.07.21.10 (version=SSLv3 cipher=RC4-MD5); Mon, 19 Jul 2010 07:21:16 -0700 (PDT) From: Anonymous To: Jim References: Date: Mon, 19 Jul 2010 18:20:52 +0400 In-Reply-To: (Jim's message of "Mon, 19 Jul 2010 04:12:02 -0400") Message-ID: <86r5izft8b.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: sockets stuck in use X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 14:21:18 -0000 Jim writes: > I was working on an application I've been developing, and I closed the > last instance a bit over 12 hours ago, but some of the sockets are > still stuck in use: > [sjss@elrond ~/dev/pipe/scripts]$ netstat | grep -e 'tcp' | grep 9612 > tcp4 0 0 192.168.1.80.42464 192.168.1.2.9612 SYN_SENT > tcp4 0 0 192.168.1.80.35742 192.168.1.2.9612 CLOSED > tcp4 0 0 192.168.1.80.46116 192.168.1.2.9612 CLOSED > tcp4 0 0 192.168.1.80.36792 192.168.1.2.9612 CLOSED > > > Is there any way to get rid of them without restarting the machine? I > was playing with sockopt SO_KEEPALIVE and SO_LINGER when I caused this > issue.. Does tcpdrop(8) help?