From owner-freebsd-standards@FreeBSD.ORG Sun Apr 19 19:55:26 2009 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AC81106566C; Sun, 19 Apr 2009 19:55:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 316918FC12; Sun, 19 Apr 2009 19:55:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from freefall.freebsd.org (kib@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3JJtQ7E072249; Sun, 19 Apr 2009 19:55:26 GMT (envelope-from kib@freefall.freebsd.org) Received: (from kib@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3JJtQ6f072245; Sun, 19 Apr 2009 19:55:26 GMT (envelope-from kib) Date: Sun, 19 Apr 2009 19:55:26 GMT Message-Id: <200904191955.n3JJtQ6f072245@freefall.freebsd.org> To: kib@FreeBSD.org, freebsd-standards@FreeBSD.org, kib@FreeBSD.org From: kib@FreeBSD.org Cc: Subject: Re: standards/108390: [kern] [patch] wait4() erroneously waits for all children when SIGCHLD is SIG_IGN [regression] 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: Sun, 19 Apr 2009 19:55:26 -0000 Old Synopsis: [libc] [patch] wait4() erroneously waits for all children when SIGCHLD is SIG_IGN [regression] New Synopsis: [kern] [patch] wait4() erroneously waits for all children when SIGCHLD is SIG_IGN [regression] Responsible-Changed-From-To: freebsd-standards->kib Responsible-Changed-By: kib Responsible-Changed-When: Sun Apr 19 19:54:31 UTC 2009 Responsible-Changed-Why: Take. http://www.freebsd.org/cgi/query-pr.cgi?pr=108390 From owner-freebsd-standards@FreeBSD.ORG Sun Apr 19 20:15:49 2009 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBC4F106564A; Sun, 19 Apr 2009 20:15:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 8A23F8FC08; Sun, 19 Apr 2009 20:15:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1Lvd5g-00072Y-Lk; Sun, 19 Apr 2009 22:54:12 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n3JJs91H011077 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 19 Apr 2009 22:54:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n3JJs9VZ007003; Sun, 19 Apr 2009 22:54:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n3JJs9I3007002; Sun, 19 Apr 2009 22:54:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 19 Apr 2009 22:54:09 +0300 From: Kostik Belousov To: gavin@freebsd.org Message-ID: <20090419195409.GY3014@deviant.kiev.zoral.com.ua> References: <200904161242.n3GCgG4u063936@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6ISAYjCz29ajFyjn" Content-Disposition: inline In-Reply-To: <200904161242.n3GCgG4u063936@freefall.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1Lvd5g-00072Y-Lk f49db9b6c6ec4b6cadb48e119992e752 X-Terabit: YES Cc: freebsd-bugs@freebsd.org, freebsd-standards@freebsd.org, Jilles Tjoelker , alan@pair.com Subject: Re: bin/108390: [libc] [patch] wait4() erroneously waits for all children when SIGCHLD is SIG_IGN [regression] 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: Sun, 19 Apr 2009 20:15:50 -0000 --6ISAYjCz29ajFyjn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Further check on Solaris revealed that for the case where SIGCHLD is ignored, wait4() returned -1/ECHLD, conforming to the FreeBSD behaviour of reparenting to init. Unless further comments are given, I will commit this in several days: diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 4255734..c35c6f2 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -504,13 +504,13 @@ exit1(struct thread *td, int rv) proc_reparent(p, initproc); p->p_sigparent =3D SIGCHLD; PROC_LOCK(p->p_pptr); + /* - * If this was the last child of our parent, notify - * parent, so in case he was wait(2)ing, he will + * Notify parent, so in case he was wait(2)ing or + * executiing waitpid(2) with our pid, he will * continue. */ - if (LIST_EMPTY(&pp->p_children)) - wakeup(pp); + wakeup(pp); } else mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx); =20 --6ISAYjCz29ajFyjn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAknrgWAACgkQC3+MBN1Mb4hWuACg3+YKH57zkiMYI0esiPnemGKd NaAAnRS3H0JR8hkKS4DWPjAFkoUgTt0M =8+CH -----END PGP SIGNATURE----- --6ISAYjCz29ajFyjn-- From owner-freebsd-standards@FreeBSD.ORG Mon Apr 20 11:07:00 2009 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84D811065670 for ; Mon, 20 Apr 2009 11:07:00 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 69F978FC18 for ; Mon, 20 Apr 2009 11:07:00 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3KB70Qf033172 for ; Mon, 20 Apr 2009 11:07:00 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3KB6xsc033168 for freebsd-standards@FreeBSD.org; Mon, 20 Apr 2009 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 20 Apr 2009 11:06:59 GMT Message-Id: <200904201106.n3KB6xsc033168@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org 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, 20 Apr 2009 11:07:00 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/133369 standards [patch] test(1) with 3 or 4 arguments o stand/130067 standards Wrong numeric limits in system headers? o stand/129554 standards lp(1) [patch] Implement -m and -t options o stand/129524 standards FreeBSD 7.0 isnt detecting my hardrives with raid5 o stand/128546 standards ls -p does not follow symlinks o bin/125855 standards sh(1) allows for multiline, non-escaped control struct o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/123688 standards POSIX standard changes in unistd.h and grp.h o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/121568 standards [patch] ln(1): wrong "ln -s" behaviour o stand/120947 standards xsm ignores system.xsm and .xsmstartup o stand/119804 standards [locale] [patch] Invalid (long)date format in pl_PL.IS o stand/116826 standards [patch] sh support for POSIX character classes o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude p stand/107561 standards [libc] [patch] [request] Missing SUS function tcgetsid o stand/104743 standards [headers] [patch] Wrong values for _POSIX_ minimal lim o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) o stand/96236 standards [patch] [posix] sed(1) incorrectly describes a functio o stand/96016 standards [headers] clock_getres et al should be in o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm o stand/82654 standards C99 long double math functions are missing o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( s stand/62858 standards malloc(0) not C99 compliant o stand/56476 standards cd9660 unicode support simple hack p stand/55112 standards glob.h, glob_t's gl_pathc should be "size_t", not "int o stand/54839 standards [pcvt] pcvt deficits o stand/54833 standards [pcvt] more pcvt deficits o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44425 standards getcwd() succeeds even if current dir has perm 000. p stand/41576 standards POSIX compliance of ln(1) o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings s stand/36076 standards Implementation of POSIX fuser command o kern/27835 standards [libc] execve() doesn't conform to execve(2) spec in s a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h o stand/25777 standards [kernel] [patch] atime not updated on exec o bin/25542 standards sh(1) null char in quoted string s stand/24590 standards timezone function not compatible witn Single Unix Spec o bin/24390 standards ln(1) Replacing old dir-symlinks when using /bin/ln o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 52 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Apr 20 15:47:00 2009 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE86E1065678; Mon, 20 Apr 2009 15:47:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 7D56E8FC0A; Mon, 20 Apr 2009 15:47:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1Lvvhx-0006pI-PG; Mon, 20 Apr 2009 18:46:57 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n3KFktQd076761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Apr 2009 18:46:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n3KFksXe051649; Mon, 20 Apr 2009 18:46:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n3KFks3x051648; Mon, 20 Apr 2009 18:46:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 20 Apr 2009 18:46:54 +0300 From: Kostik Belousov To: Alan Ferrency Message-ID: <20090420154654.GC3014@deviant.kiev.zoral.com.ua> References: <200904161242.n3GCgG4u063936@freefall.freebsd.org> <20090419195409.GY3014@deviant.kiev.zoral.com.ua> <20090420112723.S1321@smx2.pair.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wg2zgDM1gLxA7pbN" Content-Disposition: inline In-Reply-To: <20090420112723.S1321@smx2.pair.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1Lvvhx-0006pI-PG deac457fd46d3abe60b1157bc7b16345 X-Terabit: YES Cc: freebsd-bugs@freebsd.org, gavin@freebsd.org, freebsd-standards@freebsd.org, Jilles Tjoelker Subject: Re: bin/108390: [libc] [patch] wait4() erroneously waits for all children when SIGCHLD is SIG_IGN [regression] 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, 20 Apr 2009 15:47:01 -0000 --wg2zgDM1gLxA7pbN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 20, 2009 at 11:40:08AM -0400, Alan Ferrency wrote: > >Further check on Solaris revealed that for the case where SIGCHLD is > >ignored, wait4() returned -1/ECHLD, conforming to the FreeBSD behaviour > >of reparenting to init. >=20 > If I'm interpreting Jilles' notes about this proposed patch, it seems > like this would solve our primary problem. >=20 > That is: we already receive a -1/ECHLD when we call wait4pid() as > expected, but we don't receive it in a timely manner if there are > other child processes still running. If this patch causes wait4pid() > to return immediately when a nonexistent (exited) child PID is > specified, that would meet our expectations and preferences. Yes, this is what happens after the patch. I committed the change today. >=20 > Regarding SA_NOCLDWAIT: it was previously my understanding that > SA_NOCLDWAIT and igoring SIGCHLD affect two different aspects of child > process management. On a previous occasion when I looked into the > behavior of SA_NOCLDWAIT, it wasn't even implemented on Linux yet; but > obviously, ignoring SIGCHLD was supported. >=20 > Thanks for the patch,=20 > Alan Ferrency > pair Networks, Inc. >=20 > >Unless further comments are given, I will commit this in several days: > > > >diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c > >index 4255734..c35c6f2 100644 > >--- a/sys/kern/kern_exit.c > >+++ b/sys/kern/kern_exit.c > >@@ -504,13 +504,13 @@ exit1(struct thread *td, int rv) > > proc_reparent(p, initproc); > > p->p_sigparent =3D SIGCHLD; > > PROC_LOCK(p->p_pptr); > >+ > > /* > >- * If this was the last child of our parent, notify > >- * parent, so in case he was wait(2)ing, he will > >+ * Notify parent, so in case he was wait(2)ing or > >+ * executiing waitpid(2) with our pid, he will > > * continue. > > */ > >- if (LIST_EMPTY(&pp->p_children)) > >- wakeup(pp); > >+ wakeup(pp); > > } else > > mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx); > > > > --wg2zgDM1gLxA7pbN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAknsmO4ACgkQC3+MBN1Mb4iWdQCdH+w7GKVa9G4FR1g6/bKVxLmL KHUAoOHOecTUsu29Bu1xronT9WZKgjXm =Ovvv -----END PGP SIGNATURE----- --wg2zgDM1gLxA7pbN-- From owner-freebsd-standards@FreeBSD.ORG Mon Apr 20 16:06:50 2009 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0C0E1065674 for ; Mon, 20 Apr 2009 16:06:50 +0000 (UTC) (envelope-from alan@pair.com) Received: from smx2.pair.com (smx2.pair.com [66.39.3.19]) by mx1.freebsd.org (Postfix) with SMTP id 4FE178FC15 for ; Mon, 20 Apr 2009 16:06:50 +0000 (UTC) (envelope-from alan@pair.com) Received: (qmail 51118 invoked by uid 1037); 20 Apr 2009 15:40:08 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Apr 2009 15:40:08 -0000 Date: Mon, 20 Apr 2009 11:40:08 -0400 (EDT) From: Alan Ferrency To: Kostik Belousov In-Reply-To: <20090419195409.GY3014@deviant.kiev.zoral.com.ua> Message-ID: <20090420112723.S1321@smx2.pair.com> References: <200904161242.n3GCgG4u063936@freefall.freebsd.org> <20090419195409.GY3014@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@freebsd.org, gavin@freebsd.org, freebsd-standards@freebsd.org, Jilles Tjoelker Subject: Re: bin/108390: [libc] [patch] wait4() erroneously waits for all children when SIGCHLD is SIG_IGN [regression] 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, 20 Apr 2009 16:06:51 -0000 > Further check on Solaris revealed that for the case where SIGCHLD is > ignored, wait4() returned -1/ECHLD, conforming to the FreeBSD behaviour > of reparenting to init. If I'm interpreting Jilles' notes about this proposed patch, it seems like this would solve our primary problem. That is: we already receive a -1/ECHLD when we call wait4pid() as expected, but we don't receive it in a timely manner if there are other child processes still running. If this patch causes wait4pid() to return immediately when a nonexistent (exited) child PID is specified, that would meet our expectations and preferences. Regarding SA_NOCLDWAIT: it was previously my understanding that SA_NOCLDWAIT and igoring SIGCHLD affect two different aspects of child process management. On a previous occasion when I looked into the behavior of SA_NOCLDWAIT, it wasn't even implemented on Linux yet; but obviously, ignoring SIGCHLD was supported. Thanks for the patch, Alan Ferrency pair Networks, Inc. > Unless further comments are given, I will commit this in several days: > > diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c > index 4255734..c35c6f2 100644 > --- a/sys/kern/kern_exit.c > +++ b/sys/kern/kern_exit.c > @@ -504,13 +504,13 @@ exit1(struct thread *td, int rv) > proc_reparent(p, initproc); > p->p_sigparent = SIGCHLD; > PROC_LOCK(p->p_pptr); > + > /* > - * If this was the last child of our parent, notify > - * parent, so in case he was wait(2)ing, he will > + * Notify parent, so in case he was wait(2)ing or > + * executiing waitpid(2) with our pid, he will > * continue. > */ > - if (LIST_EMPTY(&pp->p_children)) > - wakeup(pp); > + wakeup(pp); > } else > mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx); > > From owner-freebsd-standards@FreeBSD.ORG Thu Apr 23 23:00:15 2009 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC19D1065670 for ; Thu, 23 Apr 2009 23:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 38FC48FC25 for ; Thu, 23 Apr 2009 23:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3NN02Li057958 for ; Thu, 23 Apr 2009 23:00:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3NN02jb057957; Thu, 23 Apr 2009 23:00:02 GMT (envelope-from gnats) Date: Thu, 23 Apr 2009 23:00:02 GMT Message-Id: <200904232300.n3NN02jb057957@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Jilles Tjoelker Cc: Subject: Re: standards/116826: [patch] sh support for POSIX character classes X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jilles Tjoelker List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2009 23:00:15 -0000 The following reply was made to PR standards/116826; it has been noted by GNATS. From: Jilles Tjoelker To: bug-followup@FreeBSD.org, uberlord@gentoo.org Cc: Subject: Re: standards/116826: [patch] sh support for POSIX character classes Date: Fri, 24 Apr 2009 00:52:12 +0200 The patch seems to work in brief testing. The code seems to be taken from dash, and an attribution/copyright notice seems missing. I put an improved patch (also including a bug fix from dash) on http://www.stack.nl/~jilles/unix/sh-match-charclass.patch Recent versions of dash can use fnmatch(3) (and also glob(3)) instead of the internal implementations; this is however not used by default (I suppose it was added to make it possible to build smaller binaries; dash is also obfuscated in some places to decrease binary size). It requires converting the CTLESC etc quoting to backslash quoting. This could be nice in that our fnmatch supports multibyte characters; however it does not support the [:alpha:] classes either. -- Jilles Tjoelker