From owner-freebsd-standards@FreeBSD.ORG Mon Mar 11 11:06:50 2013 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 11C0AB33 for ; Mon, 11 Mar 2013 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 02E557DD for ; Mon, 11 Mar 2013 11:06:49 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BB6naX089147 for ; Mon, 11 Mar 2013 11:06:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2BB6nbu089144 for freebsd-standards@FreeBSD.org; Mon, 11 Mar 2013 11:06:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 11 Mar 2013 11:06:49 GMT Message-Id: <201303111106.r2BB6nbu089144@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 Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2013 11:06:50 -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/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt o stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf o stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) 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/100017 standards [Patch] Add fuser(1) functionality to fstat(1) a stand/86484 standards [patch] mkfifo(1) uses wrong permissions 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( o stand/56476 standards [patch] cd9660 unicode support simple hack 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/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 42 problems total. From owner-freebsd-standards@FreeBSD.ORG Wed Mar 13 12:20:01 2013 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 608BB6AC for ; Wed, 13 Mar 2013 12:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 46DF6D7B for ; Wed, 13 Mar 2013 12:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DCK1lg054691 for ; Wed, 13 Mar 2013 12:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2DCK1hV054690; Wed, 13 Mar 2013 12:20:01 GMT (envelope-from gnats) Resent-Date: Wed, 13 Mar 2013 12:20:01 GMT Resent-Message-Id: <201303131220.r2DCK1hV054690@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Vadim S. Goncharov" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A4AB8573 for ; Wed, 13 Mar 2013 12:18:25 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 95015D58 for ; Wed, 13 Mar 2013 12:18:25 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2DCIOIG048935 for ; Wed, 13 Mar 2013 12:18:24 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r2DCIO9u048934; Wed, 13 Mar 2013 12:18:24 GMT (envelope-from nobody) Message-Id: <201303131218.r2DCIO9u048934@red.freebsd.org> Date: Wed, 13 Mar 2013 12:18:24 GMT From: "Vadim S. Goncharov" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: standards/176916: [patch] sh(1): implement multiple arguments to wait builtin X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2013 12:20:01 -0000 >Number: 176916 >Category: standards >Synopsis: [patch] sh(1): implement multiple arguments to wait builtin >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 13 12:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Vadim S. Goncharov >Release: FreeBSD 9.0-RELEASE amd64 >Organization: RU-CENTER (www.nic.ru) >Environment: FreeBSD noc-42.nic.ru 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: POSIX.2 requires that wait(1) built-in in sh(1) shall support multiple arguments, and that unknown (e.g. errorneous) job specification be treated as known with exit status 127 (it is currently 2), see http://pubs.opengroup.org/onlinepubs/009695399/utilities/wait.html The patch attached implements this functionality which was absent in our shell. This feature is essential for implementing e.g. parallel execution of rc.d scripts, so please commit/MFC it as soon as possible :) >How-To-Repeat: Try to do sleep 33 & sleep 44 & wait %2 %1 echo $? other args are ignored. >Fix: Patch attached. Patch attached with submission follows: Index: bin/sh/sh.1 =================================================================== --- bin/sh/sh.1 (revision 248189) +++ bin/sh/sh.1 (working copy) @@ -2598,12 +2598,17 @@ option is specified, the .Ar name arguments are treated as function names. -.It Ic wait Op Ar job -Wait for the specified +.It Ic wait Op Ar job ... +Wait for each specified .Ar job to complete and return the exit status of the last process in the +last specified .Ar job . -If the argument is omitted, wait for all jobs to complete +If any +.Ar job +specified is incorrect or unknown to shell, it is treated as if it +were known job that exited with exit status 127. +If arguments are omitted, wait for all jobs to complete and return an exit status of zero. .El .Ss Commandline Editing Index: bin/sh/jobs.c =================================================================== --- bin/sh/jobs.c (revision 248189) +++ bin/sh/jobs.c (working copy) @@ -95,6 +95,7 @@ static void restartjob(struct job *); #endif static void freejob(struct job *); +static int waitcmdloop(struct job *); static struct job *getjob(char *); pid_t getjobpgrp(char *); static pid_t dowait(int, struct job *); @@ -461,15 +462,35 @@ waitcmd(int argc, char **argv) { struct job *job; + struct jmploc jmploc; + struct jmploc *const savehandler = handler; + int retval = 0; + + if (argc <= 1) + return waitcmdloop(NULL); + + do { + if (setjmp(jmploc.loc)) { + retval = 127; /* Posix.2, section 4.70.2 */ + handler = savehandler; + continue; + } else { + handler = &jmploc; + job = getjob(*++argv); + } + handler = savehandler; + retval = waitcmdloop(job); + } while (--argc > 1); + + return (retval); +} + +static int +waitcmdloop(struct job *job) +{ int status, retval; struct job *jp; - if (argc > 1) { - job = getjob(argv[1]); - } else { - job = NULL; - } - /* * Loop until a process is terminated or stopped, or a SIGINT is * received. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Fri Mar 15 17:25:53 2013 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5A96D48C; Fri, 15 Mar 2013 17:25:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 36933F33; Fri, 15 Mar 2013 17:25:53 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FHPr4V085408; Fri, 15 Mar 2013 17:25:53 GMT (envelope-from jilles@freefall.freebsd.org) Received: (from jilles@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2FHPrNc085407; Fri, 15 Mar 2013 17:25:53 GMT (envelope-from jilles) Date: Fri, 15 Mar 2013 17:25:53 GMT Message-Id: <201303151725.r2FHPrNc085407@freefall.freebsd.org> To: jilles@FreeBSD.org, freebsd-standards@FreeBSD.org, jilles@FreeBSD.org From: jilles@FreeBSD.org Subject: Re: standards/176916: [patch] sh(1): implement multiple arguments to wait builtin X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2013 17:25:53 -0000 Synopsis: [patch] sh(1): implement multiple arguments to wait builtin Responsible-Changed-From-To: freebsd-standards->jilles Responsible-Changed-By: jilles Responsible-Changed-When: Fri Mar 15 17:13:47 UTC 2013 Responsible-Changed-Why: sh(1) is my area. The wait builtin is indeed required to accept multiple operands and to treat unknown process IDs as known process IDs that exited with status 127. The way you patched getjob seems incorrect as it will still print an error message. Also, I would like to avoid calling setjmp(). I will also implement "--" handling and rejection of unknown options in "wait" first. About working around the lack of these features, invoking "wait" with multiple operands is equivalent to invoking it multiple times with one operand each. Passing unknown process IDs can be avoided iff there are no trap handlers that do not exit. http://www.freebsd.org/cgi/query-pr.cgi?pr=176916 From owner-freebsd-standards@FreeBSD.ORG Fri Mar 15 23:41:48 2013 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8697B8C2; Fri, 15 Mar 2013 23:41:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 5EF1D67F; Fri, 15 Mar 2013 23:41:48 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FNfmqW058334; Fri, 15 Mar 2013 23:41:48 GMT (envelope-from eadler@freefall.freebsd.org) Received: (from eadler@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2FNflNg058333; Fri, 15 Mar 2013 23:41:47 GMT (envelope-from eadler) Date: Fri, 15 Mar 2013 23:41:47 GMT Message-Id: <201303152341.r2FNflNg058333@freefall.freebsd.org> To: jau@iki.fi, eadler@FreeBSD.org, freebsd-standards@FreeBSD.org From: eadler@FreeBSD.org Subject: Re: standards/107561: [libc] [patch] [request] Missing SUS function tcgetsid() X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2013 23:41:48 -0000 Synopsis: [libc] [patch] [request] Missing SUS function tcgetsid() State-Changed-From-To: patched->closed State-Changed-By: eadler State-Changed-When: Fri Mar 15 23:41:47 UTC 2013 State-Changed-Why: MFCed/fixed by now or it will never be MFCed http://www.freebsd.org/cgi/query-pr.cgi?pr=107561