From owner-freebsd-net@freebsd.org Tue Nov 14 09:52:58 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E417DB98D3 for ; Tue, 14 Nov 2017 09:52:58 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA8F77968 for ; Tue, 14 Nov 2017 09:52:57 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (ezra.dcm1.omnilan.net [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id vAE9qu7w053106 for ; Tue, 14 Nov 2017 10:52:56 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 1FE2BA1E; Tue, 14 Nov 2017 10:52:56 +0100 (CET) Message-ID: <5A0ABCF7.6080606@omnilan.de> Date: Tue, 14 Nov 2017 10:52:55 +0100 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: userland shutdown(2)? Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Tue, 14 Nov 2017 10:52:56 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 09:52:58 -0000 Hello, stoping jails leaves open sockets with no process attached. (sockstat shows like this line: ? ? ? ? tcp6 2001:db8::fedc:389 2001:db8::abcd:15666 ) Since I make use of mount lines in jail.conf, umounting the root filesystem of the jail fails because "device busy". To avoid dirty filesystems after reboot of the host, my modified rc.d/jail updates the corresponding filesystem to be mounted readonly, but that's not a great solution. I'd like to get all sockets killed before jail vanishes. There's shutdown(2), which seems to do exactly what I want, but where/how to implement? Is there any userland tool utilizing shutdown(2)? Thanks, -Harry