From owner-freebsd-standards@FreeBSD.ORG Mon Sep 11 08:58:58 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B35616A417 for ; Mon, 11 Sep 2006 08:58:58 +0000 (UTC) (envelope-from ssedov@mbsd.msk.ru) Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 968AE43D53 for ; Mon, 11 Sep 2006 08:58:57 +0000 (GMT) (envelope-from ssedov@mbsd.msk.ru) Received: from [80.250.160.136] (helo=fonon.realnet) by com1.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1GMhd2-0001pf-Fw; Mon, 11 Sep 2006 12:58:56 +0400 Received: from localhost (localhost [127.0.0.1]) by fonon.realnet (Postfix) with ESMTP id 8EB0611B23; Mon, 11 Sep 2006 12:58:16 +0400 (MSD) Date: Mon, 11 Sep 2006 12:58:16 +0400 From: Stanislav Sedov To: Roy Marples , freebsd-standards@freebsd.org Message-ID: <20060911125816.4a606317@localhost> In-Reply-To: <200609102148.26767.uberlord@gentoo.org> References: <200609102148.26767.uberlord@gentoo.org> Organization: MBSD labs, Inc. X-Operating-System: FreeBSD X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_w5xH4EP6iVI3bbzMhU2m.Fz; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.6.0 Cc: Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 08:58:58 -0000 --Sig_w5xH4EP6iVI3bbzMhU2m.Fz Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On Sun, 10 Sep 2006 21:48:26 +0100 Roy Marples mentioned: > Hi >=20 > I'm currently adding FreeBSD support to Gentoo baselayout rc system. We u= se=20 > the linux fuser tool a bit, and rely on the return value being non zero o= f no=20 > files are in use on the requested mount points. >=20 > Attached is a patch that enables the same in FreeBSD >=20 But POSIX says the following: -------------------------------------------------------------- EXIT STATUS The following exit values shall be returned: 0 Successful completion. >0 An error occurred. -------------------------------------------------------------- So, as I understand correctly, we should return 0 in this case. I CC'ed the message to freebsd-standards, I hope we'll have a productive discussion. I'm the author of this utility, so all changes can be integrated upstream, if needed. --=20 Stanislav Sedov MBSD labs, Inc. =F2=CF=D3=D3=C9=D1, =ED=CF=D3=CB=D7=C1 http://mbsd.msk.ru -------------------------------------------------------------------- If the facts don't fit the theory, change the facts. -- A. Einstein -------------------------------------------------------------------- PGP fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 --Sig_w5xH4EP6iVI3bbzMhU2m.Fz Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFFBSUoK/VZk+smlYERAknoAJ0TtSaFrHTc632v+0H1wZZ7J6AEuACfQx7G L75VMtUCZ9QLj+YF7+4t+QA= =6IoD -----END PGP SIGNATURE----- --Sig_w5xH4EP6iVI3bbzMhU2m.Fz-- From owner-freebsd-standards@FreeBSD.ORG Mon Sep 11 11:08:36 2006 Return-Path: X-Original-To: freebsd-standards@FreeBSD.org Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 438AC16A67B for ; Mon, 11 Sep 2006 11:08:36 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05E9C43D49 for ; Mon, 11 Sep 2006 11:08:36 +0000 (GMT) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8BB8ZS2063334 for ; Mon, 11 Sep 2006 11:08:35 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8BB8XXL063330 for freebsd-standards@FreeBSD.org; Mon, 11 Sep 2006 11:08:33 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 11 Sep 2006 11:08:33 GMT Message-Id: <200609111108.k8BB8XXL063330@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 11:08:36 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/25542 standards /bin/sh: null char in quoted string o kern/46239 standards posix semaphore implementation errors o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/82654 standards C99 long double math functions are missing o stand/94729 standards fcntl() throws undocumented ENOTTY 5 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/21519 standards sys/dir.h should be deprecated some more o bin/24390 standards Replacing old dir-symlinks when using /bin/ln s stand/24590 standards timezone function not compatible witn Single Unix Spec s kern/28260 standards UIO_MAXIOV needs to be made public s stand/36076 standards Implementation of POSIX fuser command s stand/37843 standards manual for pthread_setschedparam(3) is wrong o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings p stand/41576 standards POSIX compliance of ln(1) o stand/44425 standards getcwd() succeeds even if current dir has perm 000. o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/54833 standards [pcvt] more pcvt deficits o stand/54839 standards [pcvt] pcvt deficits p stand/55112 standards glob.h, glob_t's gl_pathc should be "size_t", not "int o stand/56476 standards cd9660 unicode support simple hack o stand/58676 standards grantpt(3) alters storage used by ptsname(3) s stand/62858 standards malloc(0) not C99 compliant s kern/64875 standards [libc] [patch] [feature request] add a system call: fd o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- o stand/66531 standards _gettemp uses a far smaller set of filenames than docu o stand/70813 standards [PATCH] ls(1) not Posix compliant o stand/72006 standards floating point formating in non-C locales o stand/79056 standards regex(3) regression tests a stand/80293 standards sysconf() does not support well-defined unistd values o stand/81287 standards [PATCH]: fingerd(8) might send a line not ending in CR o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm o stand/85080 standards output of long double subnormals (with printf) is wron o stand/92360 standards [headers] [patch] Missing TAB3 in kernel headers o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/96016 standards clock_getres et al should be in o stand/96236 standards [PATCH] [POSIX] sed.1 incorrectly describes a function o stand/99517 standards Missing SIGRTMIN and SIGRTMAX signals o stand/99926 standards [Patch] [sh(1)'s jobs] POSIX compliancy by adding -p s o stand/99960 standards [Patch] [make] Add -p flag o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) 35 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Sep 11 18:09:28 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF1A416A403 for ; Mon, 11 Sep 2006 18:09:28 +0000 (UTC) (envelope-from uberlord@gentoo.org) Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FC7443D76 for ; Mon, 11 Sep 2006 18:09:21 +0000 (GMT) (envelope-from uberlord@gentoo.org) Received: from uberpc.marples.name (uberpc.marples.name [10.73.1.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTP id 87A9C190038; Mon, 11 Sep 2006 19:09:20 +0100 (BST) From: Roy Marples Organization: Gentoo To: Stanislav Sedov Date: Mon, 11 Sep 2006 19:09:23 +0100 User-Agent: KMail/1.9.4 References: <200609102148.26767.uberlord@gentoo.org> <20060911125816.4a606317@localhost> In-Reply-To: <20060911125816.4a606317@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609111909.23599.uberlord@gentoo.org> Cc: freebsd-standards@freebsd.org Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 18:09:29 -0000 On Monday 11 September 2006 09:58, Stanislav Sedov wrote: > On Sun, 10 Sep 2006 21:48:26 +0100 > > Roy Marples mentioned: > > Hi > > > > I'm currently adding FreeBSD support to Gentoo baselayout rc system. We > > use the linux fuser tool a bit, and rely on the return value being non > > zero of no files are in use on the requested mount points. > > > > Attached is a patch that enables the same in FreeBSD > > But POSIX says the following: > -------------------------------------------------------------- > EXIT STATUS > > The following exit values shall be returned: > > 0 > Successful completion. > > >0 > > An error occurred. > -------------------------------------------------------------- > > So, as I understand correctly, we should return 0 in this case. Do they define what <0 means? Could always return -1. A return value is easier than checking output. Thanks -- Roy Marples Gentoo/Linux Developer (baselayout, networking) From owner-freebsd-standards@FreeBSD.ORG Mon Sep 11 19:53:30 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F22B16A49E; Mon, 11 Sep 2006 19:53:30 +0000 (UTC) (envelope-from ssedov@mbsd.msk.ru) Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id B618B43D70; Mon, 11 Sep 2006 19:53:18 +0000 (GMT) (envelope-from ssedov@mbsd.msk.ru) Received: from [213.87.86.28] (helo=fonon.realnet) by com1.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1GMrq0-0002Yq-84; Mon, 11 Sep 2006 23:53:01 +0400 Received: from localhost (localhost [127.0.0.1]) by fonon.realnet (Postfix) with ESMTP id 514DB11B23; Mon, 11 Sep 2006 23:52:13 +0400 (MSD) Date: Mon, 11 Sep 2006 23:52:11 +0400 From: Stanislav Sedov To: Roy Marples Message-ID: <20060911235211.140f90f5@localhost> In-Reply-To: <200609111909.23599.uberlord@gentoo.org> References: <200609102148.26767.uberlord@gentoo.org> <20060911125816.4a606317@localhost> <200609111909.23599.uberlord@gentoo.org> Organization: MBSD labs, Inc. X-Operating-System: FreeBSD X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_4bE07RwAcCewy/.4MYv6CF2"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.6.0 Cc: freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 19:53:30 -0000 --Sig_4bE07RwAcCewy/.4MYv6CF2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On Mon, 11 Sep 2006 19:09:23 +0100 Roy Marples mentioned: > On Monday 11 September 2006 09:58, Stanislav Sedov wrote: > > On Sun, 10 Sep 2006 21:48:26 +0100 > > > > Roy Marples mentioned: > > > Hi > > > > > > I'm currently adding FreeBSD support to Gentoo baselayout rc system. = We > > > use the linux fuser tool a bit, and rely on the return value being non > > > zero of no files are in use on the requested mount points. > > > > > > Attached is a patch that enables the same in FreeBSD > > > > But POSIX says the following: > > -------------------------------------------------------------- > > EXIT STATUS > > > > The following exit values shall be returned: > > > > 0 > > Successful completion. > > > > >0 > > > > An error occurred. > > -------------------------------------------------------------- > > > > So, as I understand correctly, we should return 0 in this case. >=20 > Do they define what <0 means? Could always return -1. >=20 > A return value is easier than checking output. >=20 But they wants the value 0 to be returned in case of no errors, and since there are no errors in case of no files opened on mountpoint, returning non-zero could break some apps that relies on POSIX functionality. IIRC, solaris resembles the same behavior. You can check fuser entry in POSIX, it's available for free on opengroup.org. I might miss something.=20 --=20 Stanislav Sedov MBSD labs, Inc. =F2=CF=D3=D3=C9=D1, =ED=CF=D3=CB=D7=C1 http://mbsd.msk.ru -------------------------------------------------------------------- If the facts don't fit the theory, change the facts. -- A. Einstein -------------------------------------------------------------------- PGP fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 --Sig_4bE07RwAcCewy/.4MYv6CF2 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFFBb5sK/VZk+smlYERAo0fAJ0Xy7k4av5aJLszGKnXCAn54cWXLwCfa2vM m8Yy9AR5xLVYWtQfczTwFEM= =7n33 -----END PGP SIGNATURE----- --Sig_4bE07RwAcCewy/.4MYv6CF2-- From owner-freebsd-standards@FreeBSD.ORG Mon Sep 11 20:05:28 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B67016A412; Mon, 11 Sep 2006 20:05:28 +0000 (UTC) (envelope-from ssedov@mbsd.msk.ru) Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 877E243D68; Mon, 11 Sep 2006 20:05:21 +0000 (GMT) (envelope-from ssedov@mbsd.msk.ru) Received: from [213.87.86.28] (helo=fonon.realnet) by com1.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1GMs1u-0005AD-VU; Tue, 12 Sep 2006 00:05:20 +0400 Received: from localhost (localhost [127.0.0.1]) by fonon.realnet (Postfix) with ESMTP id 04F6C11B23; Tue, 12 Sep 2006 00:04:34 +0400 (MSD) Date: Tue, 12 Sep 2006 00:04:33 +0400 From: Stanislav Sedov To: Roy Marples Message-ID: <20060912000433.7a51cae4@localhost> In-Reply-To: <20060911235211.140f90f5@localhost> References: <200609102148.26767.uberlord@gentoo.org> <20060911125816.4a606317@localhost> <200609111909.23599.uberlord@gentoo.org> <20060911235211.140f90f5@localhost> Organization: MBSD labs, Inc. X-Operating-System: FreeBSD X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_cqiMauTzbyhew+as=b4o.Y0"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.6.0 Cc: freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 20:05:28 -0000 --Sig_cqiMauTzbyhew+as=b4o.Y0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On Mon, 11 Sep 2006 23:52:11 +0400 Stanislav Sedov mentioned: >=20 > But they wants the value 0 to be returned in case of no errors, and > since there are no errors in case of no files opened on mountpoint, > returning non-zero could break some apps that relies on POSIX > functionality. >=20 > IIRC, solaris resembles the same behavior. >=20 > You can check fuser entry in POSIX, it's available for free on > opengroup.org. I might miss something.=20 >=20 BTW, maybe someone could commit this utility in the base system? FreeBSD still lacks support of this POSIX app. IIRC, someone was going to commit this year-two ago, but, unfortunately, gave this up :-( This version supports much more filesystems than stock fstat utility and uses more efficient algorithms to find entries. --=20 Stanislav Sedov MBSD labs, Inc. =F2=CF=D3=D3=C9=D1, =ED=CF=D3=CB=D7=C1 http://mbsd.msk.ru -------------------------------------------------------------------- If the facts don't fit the theory, change the facts. -- A. Einstein -------------------------------------------------------------------- PGP fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 --Sig_cqiMauTzbyhew+as=b4o.Y0 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD4DBQFFBcFRK/VZk+smlYERAi3LAJYsb41wR5GWV41FWlpYExJxIM1FAJ9PJeQ1 4qF5daf3h3UGJOK5golfaQ== =9tFN -----END PGP SIGNATURE----- --Sig_cqiMauTzbyhew+as=b4o.Y0-- From owner-freebsd-standards@FreeBSD.ORG Mon Sep 11 20:29:42 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 679E616A40F; Mon, 11 Sep 2006 20:29:42 +0000 (UTC) (envelope-from uberlord@gentoo.org) Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAEC843D7B; Mon, 11 Sep 2006 20:29:39 +0000 (GMT) (envelope-from uberlord@gentoo.org) Received: from uberpc.marples.name (uberpc.marples.name [10.73.1.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTP id E796E190038; Mon, 11 Sep 2006 21:29:36 +0100 (BST) From: Roy Marples Organization: Gentoo To: Stanislav Sedov Date: Mon, 11 Sep 2006 21:29:40 +0100 User-Agent: KMail/1.9.4 References: <200609102148.26767.uberlord@gentoo.org> <200609111909.23599.uberlord@gentoo.org> <20060911235211.140f90f5@localhost> In-Reply-To: <20060911235211.140f90f5@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609112129.40199.uberlord@gentoo.org> Cc: freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 20:29:42 -0000 On Monday 11 September 2006 20:52, Stanislav Sedov wrote: > But they wants the value 0 to be returned in case of no errors, and > since there are no errors in case of no files opened on mountpoint, > returning non-zero could break some apps that relies on POSIX > functionality. > > IIRC, solaris resembles the same behavior. OK, you win - I'll parse the output :) Thanks -- Roy Marples Gentoo/Linux Developer (baselayout, networking) From owner-freebsd-standards@FreeBSD.ORG Mon Sep 11 20:31:35 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B74E16A403; Mon, 11 Sep 2006 20:31:35 +0000 (UTC) (envelope-from uberlord@gentoo.org) Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D62AA43D73; Mon, 11 Sep 2006 20:31:34 +0000 (GMT) (envelope-from uberlord@gentoo.org) Received: from uberpc.marples.name (uberpc.marples.name [10.73.1.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTP id 35B3A190038; Mon, 11 Sep 2006 21:31:34 +0100 (BST) From: Roy Marples Organization: Gentoo To: Stanislav Sedov Date: Mon, 11 Sep 2006 21:31:37 +0100 User-Agent: KMail/1.9.4 References: <200609102148.26767.uberlord@gentoo.org> <20060911235211.140f90f5@localhost> <20060912000433.7a51cae4@localhost> In-Reply-To: <20060912000433.7a51cae4@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609112131.37576.uberlord@gentoo.org> Cc: freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 20:31:35 -0000 On Monday 11 September 2006 21:04, Stanislav Sedov wrote: > BTW, maybe someone could commit this utility in the base system? > FreeBSD still lacks support of this POSIX app. > > This version supports much more filesystems than stock fstat utility > and uses more efficient algorithms to find entries. That would be a good idea :) -- Roy Marples Gentoo/Linux Developer (baselayout, networking) From owner-freebsd-standards@FreeBSD.ORG Tue Sep 12 06:32:50 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2EADB16A412 for ; Tue, 12 Sep 2006 06:32:50 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 722F943D49 for ; Tue, 12 Sep 2006 06:32:49 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 0A65B2094; Tue, 12 Sep 2006 08:32:45 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id EFB42208F; Tue, 12 Sep 2006 08:32:44 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id CBA27B854; Tue, 12 Sep 2006 08:32:44 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Roy Marples References: <200609102148.26767.uberlord@gentoo.org> <20060911125816.4a606317@localhost> <200609111909.23599.uberlord@gentoo.org> Date: Tue, 12 Sep 2006 08:32:44 +0200 In-Reply-To: <200609111909.23599.uberlord@gentoo.org> (Roy Marples's message of "Mon, 11 Sep 2006 19:09:23 +0100") Message-ID: <867j098uib.fsf@dwp.des.no> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-standards@freebsd.org Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2006 06:32:50 -0000 Roy Marples writes: > Do they define what <0 means? Could always return -1. Exit codes are positive integers in the range 0-255. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-standards@FreeBSD.ORG Tue Sep 12 11:06:48 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF38516A412; Tue, 12 Sep 2006 11:06:48 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E5C143D58; Tue, 12 Sep 2006 11:06:44 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (hkjofy@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k8CB6b9t088487; Tue, 12 Sep 2006 13:06:42 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k8CB6bwD088486; Tue, 12 Sep 2006 13:06:37 +0200 (CEST) (envelope-from olli) Date: Tue, 12 Sep 2006 13:06:37 +0200 (CEST) Message-Id: <200609121106.k8CB6bwD088486@lurza.secnetix.de> From: Oliver Fromme To: uberlord@gentoo.org, ssedov@mbsd.msk.ru, freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org In-Reply-To: <200609112129.40199.uberlord@gentoo.org> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 12 Sep 2006 13:06:43 +0200 (CEST) Cc: Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2006 11:06:48 -0000 Roy Marples wrote: > Stanislav Sedov wrote: > > But they wants the value 0 to be returned in case of no errors, and > > since there are no errors in case of no files opened on mountpoint, > > returning non-zero could break some apps that relies on POSIX > > functionality. > > > > IIRC, solaris resembles the same behavior. > > OK, you win - I'll parse the output :) There's no need to parse it. If you only want to know if _any_ process is accessing a file at all, it's sufficient to check if stdout from fuser is non-empty. In shell- script syntax: if [ -n "`fuser -f whatever 2>/dev/null`" ]; then echo "File is being accessed." fi Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "anyone new to programming should be kept as far from C++ as possible; actually showing the stuff should be considered a criminal offence" -- Jacek Generowicz From owner-freebsd-standards@FreeBSD.ORG Tue Sep 12 13:36:51 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67ED116A403; Tue, 12 Sep 2006 13:36:51 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (meestal.stack.nl [131.155.140.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EDD943D53; Tue, 12 Sep 2006 13:36:49 +0000 (GMT) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id A7F6A4B177; Tue, 12 Sep 2006 15:36:48 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 927E12288D; Tue, 12 Sep 2006 15:36:48 +0200 (CEST) Date: Tue, 12 Sep 2006 15:36:48 +0200 From: Jilles Tjoelker To: Stanislav Sedov Message-ID: <20060912133648.GA7943@stack.nl> References: <200609102148.26767.uberlord@gentoo.org> <20060911125816.4a606317@localhost> <200609111909.23599.uberlord@gentoo.org> <20060911235211.140f90f5@localhost> <20060912000433.7a51cae4@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060912000433.7a51cae4@localhost> X-Operating-System: FreeBSD 5.5-RELEASE-p1 i386 User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org, Roy Marples , freebsd-standards@freebsd.org Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2006 13:36:51 -0000 On Tue, Sep 12, 2006 at 12:04:33AM +0400, Stanislav Sedov wrote: [sysutils/fuser port] > BTW, maybe someone could commit this utility in the base system? > FreeBSD still lacks support of this POSIX app. > IIRC, someone was going to commit this year-two ago, but, unfortunately, > gave this up :-( > This version supports much more filesystems than stock fstat utility > and uses more efficient algorithms to find entries. It does not share any code with fstat(1), which is undesirable as any further changes will have to be made to both fstat(1) and fuser(1). PR standards/100017 has a better approach, putting fstat and fuser in the same binary. If the filesystem support and algorithms need to be improved, that can be done in fstat then. This PR also points to two failed fuser(1) attempts. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Tue Sep 12 21:02:37 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A12D916A416; Tue, 12 Sep 2006 21:02:37 +0000 (UTC) (envelope-from uberlord@gentoo.org) Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34EAC43D55; Tue, 12 Sep 2006 21:02:35 +0000 (GMT) (envelope-from uberlord@gentoo.org) Received: from uberlaptop.marples.name (uberlaptop.marples.name [10.73.1.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTP id E7B0C1900AD; Tue, 12 Sep 2006 22:02:26 +0100 (BST) From: Roy Marples Organization: Gentoo/Linux To: Oliver Fromme Date: Tue, 12 Sep 2006 22:02:28 +0100 User-Agent: KMail/1.9.4 References: <200609121106.k8CB6bwD088486@lurza.secnetix.de> In-Reply-To: <200609121106.k8CB6bwD088486@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609122202.29269.uberlord@gentoo.org> Cc: freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org Subject: Re: FreeBSD Port: sysutils/fuser X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2006 21:02:37 -0000 On Tuesday 12 September 2006 12:06, Oliver Fromme wrote: > Roy Marples wrote: > > Stanislav Sedov wrote: > > > But they wants the value 0 to be returned in case of no errors, and > > > since there are no errors in case of no files opened on mountpoint, > > > returning non-zero could break some apps that relies on POSIX > > > functionality. > > > > > > IIRC, solaris resembles the same behavior. > > > > OK, you win - I'll parse the output :) > > There's no need to parse it. If you only want to know if > _any_ process is accessing a file at all, it's sufficient > to check if stdout from fuser is non-empty. Of course, that's what I meant ;) -- Roy Marples Gentoo/Linux Developer (baselayout, networking) From owner-freebsd-standards@FreeBSD.ORG Fri Sep 15 13:18:34 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0612816A403 for ; Fri, 15 Sep 2006 13:18:34 +0000 (UTC) (envelope-from arcade@synergetica.dn.ua) Received: from nora.synergetica.dn.ua (synergetica.dn.ua [82.207.115.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E23443D6E for ; Fri, 15 Sep 2006 13:18:28 +0000 (GMT) (envelope-from arcade@synergetica.dn.ua) Received: from [172.30.0.159] (yarn.lan [172.30.0.159]) (authenticated bits=0) by nora.synergetica.dn.ua (8.13.8/8.13.8) with ESMTP id k8FDIPFc008222 for ; Fri, 15 Sep 2006 16:18:26 +0300 (EEST) (envelope-from arcade@synergetica.dn.ua) Message-ID: <450AA821.9050000@synergetica.dn.ua> Date: Fri, 15 Sep 2006 16:18:25 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.8.0.6) Gecko/20060804 SeaMonkey/1.0.4 MIME-Version: 1.0 To: freebsd-standards@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: find regular expression question X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2006 13:18:34 -0000 Just stumbled upon some inconsistences in find(1) regular expressions parsing: [code] > :>a > find . -regex '^\./a\?$' > find . | grep '^\./a\?$' ./a [/code] It seems that find just dumps away '?' operand. The same regexp perfectly works in grep. Is this a bug or feature? Am I missing something? -- [WBR], Arcade. From owner-freebsd-standards@FreeBSD.ORG Fri Sep 15 16:21:19 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CBBC16A40F for ; Fri, 15 Sep 2006 16:21:19 +0000 (UTC) (envelope-from zakj@nox.cx) Received: from nox.cx (twitch.nox.cx [69.55.228.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1ED3E43D64 for ; Fri, 15 Sep 2006 16:21:17 +0000 (GMT) (envelope-from zakj@nox.cx) Received: (qmail 11446 invoked by uid 1000); 15 Sep 2006 16:21:17 -0000 Message-ID: <20060915162117.11445.qmail@nox.cx> Date: Fri, 15 Sep 2006 09:21:17 -0700 From: Zak Johnson To: Volodymyr Kostyrko Mail-Followup-To: Volodymyr Kostyrko , freebsd-standards@freebsd.org References: <450AA821.9050000@synergetica.dn.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <450AA821.9050000@synergetica.dn.ua> Cc: freebsd-standards@freebsd.org Subject: Re: find regular expression question X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2006 16:21:19 -0000 Volodymyr Kostyrko wrote: > Just stumbled upon some inconsistences in find(1) regular expressions > parsing: > > [code] > > :>a > > find . -regex '^\./a\?$' > > find . | grep '^\./a\?$' > ./a > [/code] Find uses basic (obsolete) regular expressions by default; '?' is an ordinary character. You can use either of the following instead: find . -regex '^\./a\{0,1\}$' find -E . -regex '^\./a?$' find's '-E' option makes -regex use the extended regular expression syntax, documented in re_format(7). GNU grep uses its own---slightly different---re syntax, described in grep(1). -Zak