From owner-freebsd-standards@FreeBSD.ORG Mon Feb 4 03:20:00 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 955EA5BE for ; Mon, 4 Feb 2013 03:20:00 +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 7D4DF9E4 for ; Mon, 4 Feb 2013 03:20:00 +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 r143K0Uw037924 for ; Mon, 4 Feb 2013 03:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r143K0QK037923; Mon, 4 Feb 2013 03:20:00 GMT (envelope-from gnats) Resent-Date: Mon, 4 Feb 2013 03:20:00 GMT Resent-Message-Id: <201302040320.r143K0QK037923@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, Pedro Giffuni Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F3BD656A for ; Mon, 4 Feb 2013 03:15:53 +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 CE9809B7 for ; Mon, 4 Feb 2013 03:15:53 +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 r143FrX7026597 for ; Mon, 4 Feb 2013 03:15:53 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r143Fra2026596; Mon, 4 Feb 2013 03:15:53 GMT (envelope-from nobody) Message-Id: <201302040315.r143Fra2026596@red.freebsd.org> Date: Mon, 4 Feb 2013 03:15:53 GMT From: Pedro Giffuni To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: standards/175811: libstdc++ needs complex support in order use C99 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, 04 Feb 2013 03:20:00 -0000 >Number: 175811 >Category: standards >Synopsis: libstdc++ needs complex support in order use C99 >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: Mon Feb 04 03:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Pedro Giffuni >Release: 9.1 but the issue is verified in 10-current >Organization: >Environment: FreeBSD pcbsd-8555 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #7: Sun Oct 7 00:05:03 COT 2012 Pedro@pcbsd-8555:/usr/src/sys/amd64/compile/GENERIC amd64 >Description: >From a posting @toolchain by Dimitry Andric: I took the original gcc 4.2.1 release tarball, modified a few autoconf related scripts to cope with "freebsd10.0" being the current version, and did a full three-stage build, though only targeting C and C++. The libstdc++ configure script in 4.2.1 does detect a few new features that are not in our shipping config.h, but is does not detect any different settings regarding C99. The reason it does not turn on _GLIBCXX_USE_C99, is that not all of the C99 requirements are met, specifically checks fail: checking for ISO C99 support in ... yes checking for ISO C99 support in ... no checking for ISO C99 support in ... yes checking for ISO C99 support in ... yes checking for ISO C99 support in ... yes checking for fully enabled ISO C99 support... no The exact failure testcase goes like this: configure:7435: checking for ISO C99 support in configure:7492: /home/dim/obj/gcc-4.2.1/./gcc/xgcc -shared-libgcc -B/home/dim/obj/gcc-4.2.1/./gcc -nostdinc++ -L/home/dim/obj/gcc-4.2.1/i386-unknown-freebsd10.0/libstdc++-v3/src -L/home/dim/obj/gcc-4.2.1/i386-unknown-freebsd10.0/libstdc++-v3/src/.libs -B/home/dim/ins/gcc-4.2.1/i386-unknown-freebsd10.0/bin/ -B/home/dim/ins/gcc-4.2.1/i386-unknown-freebsd10.0/lib/ -isystem /home/dim/ins/gcc-4.2.1/i386-unknown-freebsd10.0/include -isystem /home/dim/ins/gcc-4.2.1/i386-unknown-freebsd10.0/sys-include -c -g -O2 conftest.cc >&5 conftest.cc: In function 'int main()': conftest.cc:41: error: 'clogf' was not declared in this scope conftest.cc:47: error: 'cpowf' was not declared in this scope conftest.cc:54: error: 'clog' was not declared in this scope conftest.cc:60: error: 'cpow' was not declared in this scope conftest.cc:64: error: 'ccosl' was not declared in this scope conftest.cc:65: error: 'ccoshl' was not declared in this scope conftest.cc:66: error: 'cexpl' was not declared in this scope conftest.cc:67: error: 'clogl' was not declared in this scope conftest.cc:68: error: 'csinl' was not declared in this scope conftest.cc:69: error: 'csinhl' was not declared in this scope conftest.cc:71: error: 'ctanl' was not declared in this scope conftest.cc:72: error: 'ctanhl' was not declared in this scope conftest.cc:73: error: 'cpowl' was not declared in this scope configure:7498: $? = 1 So until we actually implement and declare those functions, we should probably not enable _GLIBCXX_USE_C99_COMPLEX and _GLIBCXX_USE_C99. >How-To-Repeat: >Fix: Just a reminder (I know .. shutup and code). >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Mon Feb 4 03:28:30 2013 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AA9CC9DE; Mon, 4 Feb 2013 03:28:30 +0000 (UTC) (envelope-from pfg@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 6AB58A3E; Mon, 4 Feb 2013 03:28:30 +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 r143SUjg039510; Mon, 4 Feb 2013 03:28:30 GMT (envelope-from pfg@freefall.freebsd.org) Received: (from pfg@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r143SUd3039504; Mon, 4 Feb 2013 03:28:30 GMT (envelope-from pfg) Date: Mon, 4 Feb 2013 03:28:30 GMT Message-Id: <201302040328.r143SUd3039504@freefall.freebsd.org> To: pfg@FreeBSD.org, freebsd-standards@FreeBSD.org, freebsd-numerics@FreeBSD.org From: pfg@FreeBSD.org Subject: Re: standards/175811: libstdc++ needs complex support in order use C99 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, 04 Feb 2013 03:28:30 -0000 Synopsis: libstdc++ needs complex support in order use C99 Responsible-Changed-From-To: freebsd-standards->freebsd-numerics Responsible-Changed-By: pfg Responsible-Changed-When: Mon Feb 4 03:26:48 UTC 2013 Responsible-Changed-Why: Re-assign to freebsd-numerics@ They are known to be working on it. http://www.freebsd.org/cgi/query-pr.cgi?pr=175811 From owner-freebsd-standards@FreeBSD.ORG Mon Feb 4 03:52:17 2013 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 44827D72; Mon, 4 Feb 2013 03:52:17 +0000 (UTC) (envelope-from stephen@missouri.edu) Received: from wilberforce.math.missouri.edu (wilberforce.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id EE736ADE; Mon, 4 Feb 2013 03:52:13 +0000 (UTC) Received: from [127.0.0.1] (wilberforce.math.missouri.edu [128.206.184.213]) by wilberforce.math.missouri.edu (8.14.6/8.14.6) with ESMTP id r143qAwp016650; Sun, 3 Feb 2013 21:52:11 -0600 (CST) (envelope-from stephen@missouri.edu) Message-ID: <510F306A.6090009@missouri.edu> Date: Sun, 03 Feb 2013 21:52:10 -0600 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: pfg@FreeBSD.org Subject: Re: standards/175811: libstdc++ needs complex support in order use C99 References: <201302040328.r143SUd3039504@freefall.freebsd.org> In-Reply-To: <201302040328.r143SUd3039504@freefall.freebsd.org> X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-numerics@FreeBSD.org, 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, 04 Feb 2013 03:52:17 -0000 On 02/03/2013 09:28 PM, pfg@FreeBSD.org wrote: > Synopsis: libstdc++ needs complex support in order use C99 > > Responsible-Changed-From-To: freebsd-standards->freebsd-numerics > Responsible-Changed-By: pfg > Responsible-Changed-When: Mon Feb 4 03:26:48 UTC 2013 > Responsible-Changed-Why: > Re-assign to freebsd-numerics@ > They are known to be working on it. Hey numerics guys, We do really seem to have a lot of working code right now. And the main barrier to commitment seems to be style issues. For example, I have code at http://people.freebsd.org/~stephen/ for the complex arctrig functions. And Bruce has clog available. And presumably he has logl and atanl also available. The last I heard about my code is Bruce asking for some style changes. However I really don't think I will have time to work on it until at least the summer. And to be honest, style just isn't my thing. I propose (a) that someone else takes over my code (and maybe Bruce's code) and make the style changes, or (b) that we get a little less fussy about getting it all just so right and start committing stuff. Let me add that the code we have is already far superior than anything in Linux or NetBSD, who clearly didn't worry about huge numerical errors in many edge cases. Come on guys, let's start strutting our stuff. Let's commit what we have, even if it isn't perfect. Thanks, Stephen From owner-freebsd-standards@FreeBSD.ORG Mon Feb 4 11:06:52 2013 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3E53C9BE for ; Mon, 4 Feb 2013 11:06:52 +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 300FBD1F for ; Mon, 4 Feb 2013 11:06:52 +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 r14B6qPH028932 for ; Mon, 4 Feb 2013 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r14B6pCI028930 for freebsd-standards@FreeBSD.org; Mon, 4 Feb 2013 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 4 Feb 2013 11:06:51 GMT Message-Id: <201302041106.r14B6pCI028930@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, 04 Feb 2013 11:06:52 -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/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/170346 standards Changes to support waitid() and related stuff 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 41 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Feb 4 11:39:57 2013 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 42FCFEF5; Mon, 4 Feb 2013 11:39:57 +0000 (UTC) (envelope-from kib@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 05A9E1505; Mon, 4 Feb 2013 11:39:57 +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 r14BduGN037809; Mon, 4 Feb 2013 11:39:56 GMT (envelope-from kib@freefall.freebsd.org) Received: (from kib@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r14Bduwh037805; Mon, 4 Feb 2013 11:39:56 GMT (envelope-from kib) Date: Mon, 4 Feb 2013 11:39:56 GMT Message-Id: <201302041139.r14Bduwh037805@freefall.freebsd.org> To: jau@iki.fi, kib@FreeBSD.org, freebsd-standards@FreeBSD.org From: kib@FreeBSD.org Subject: Re: standards/170346: Changes to support waitid() and related stuff 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, 04 Feb 2013 11:39:57 -0000 Synopsis: Changes to support waitid() and related stuff State-Changed-From-To: open->closed State-Changed-By: kib State-Changed-When: Mon Feb 4 11:39:33 UTC 2013 State-Changed-Why: Waitid committed to HEAD and merged to stable/9. http://www.freebsd.org/cgi/query-pr.cgi?pr=170346 From owner-freebsd-standards@FreeBSD.ORG Mon Feb 4 18:31:22 2013 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 626426AD; Mon, 4 Feb 2013 18:31:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id CDE4523C; Mon, 4 Feb 2013 18:31:21 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r14IVHAo024022; Mon, 4 Feb 2013 20:31:17 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r14IVHAo024022 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r14IVHRL024021; Mon, 4 Feb 2013 20:31:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 4 Feb 2013 20:31:17 +0200 From: Konstantin Belousov To: jilles@freebsd.org Subject: ERESTART translation in kern_openat() Message-ID: <20130204183117.GD2522@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6s9pT91Bd/NCe2Rx" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: 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, 04 Feb 2013 18:31:22 -0000 --6s9pT91Bd/NCe2Rx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, you noted somewhere that the unconditional translation of the ERESTART to EINTR, performed by kern_openat(), is wrong. I mostly agree with your statement, e.g. it is definitely wrong for fifos, but translation itself is useful for devfs, in my opinion. E.g., you do not want the tape unwind to be restarted this way. I propose not to remove the translation, but limit it to devfs only. See the patch below. Any comments ? diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 9851229..7da9b11 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1089,8 +1089,11 @@ devfs_open(struct vop_open_args *ap) =20 vn_lock(vp, vlocked | LK_RETRY); dev_relthread(dev, ref); - if (error) + if (error !=3D 0) { + if (error =3D=3D ERESTART) + error =3D EINTR; return (error); + } =20 #if 0 /* /dev/console */ KASSERT(fp !=3D NULL, ("Could not vnode bypass device on NULL fp")); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 1a5f2ae..dd1232c 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1106,8 +1106,6 @@ kern_openat(struct thread *td, int fd, char *path, en= um uio_seg pathseg, goto success; } =20 - if (error =3D=3D ERESTART) - error =3D EINTR; goto bad; } td->td_dupfd =3D 0; --6s9pT91Bd/NCe2Rx Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRD/50AAoJEJDCuSvBvK1B02QP/jo4u3aphkfNQWkzQxgfHoFa fuMkTlvcfJypIWj0JPHNzGFBq9UHDC6IV6glidr5vKzkeTznPQS9jHk+d5VFHR8c cKeHXFw4r/fBMqpsZXxfU4mNvJZnN5hmJIF+bkoO/LkSUkA1OaJGA/JW7sZ2KceU 67s+v15arnhKp7OR5Jy79ezhbNeA2t0QnqTTt1Z5AfMbj6oZoGV+H8fMBzjpvMT2 Er+9nQgZsEfRYKKdo4iSRGs1FRyiirs4KXb/CHXsnbEXZ6VubYS4xKnBepnN+1Ta /a4SvHQqcg30eGim8YmVXtl4G/DMZOtNvuueXYWpixb89rh7bUgO1HOAD88jsPQz y6cj5Gopyj1Nhh/hFsxKVwRyjdhyJDQ+AXDxBWPomGRYINgXwemXz8FbLPPP+0ur E+d3oqKEDuOBNB7CjWWWDWtu3ww7VqTs/r7r11RNPtaePvvqimKnYQYha9MOVshQ iHgvMneFMhIGRr3Q2MNBzcKyDBe6Hp2F6NGsIVkAUPovIRPR8UbY1itrJCegzKkd glDYRKuxBzw3Y0MV84SsRm9V6DIiottauFl22CMNP/GuBDj06vYSQLnnr6E/etYo 98NI+LB+uXMDmnJS/XDtJTYSoso9FJhWQMGzuv22uyqCOF34NfnCQ0zuQtCQJPD7 g2ISPFw8GdPdESk/+WBH =1zYv -----END PGP SIGNATURE----- --6s9pT91Bd/NCe2Rx-- From owner-freebsd-standards@FreeBSD.ORG Wed Feb 6 02:00:30 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 EF900719; Wed, 6 Feb 2013 02:00:30 +0000 (UTC) (envelope-from linimon@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 CA1B866D; Wed, 6 Feb 2013 02:00:30 +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 r1620U8r002263; Wed, 6 Feb 2013 02:00:30 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1620USb002259; Wed, 6 Feb 2013 02:00:30 GMT (envelope-from linimon) Date: Wed, 6 Feb 2013 02:00:30 GMT Message-Id: <201302060200.r1620USb002259@freefall.freebsd.org> To: dfilter@FreeBSD.ORG, linimon@FreeBSD.org, gnats-admin@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/175866: Re: standards/175453: commit references a PR 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, 06 Feb 2013 02:00:31 -0000 Old Synopsis: Re: standard/175453: commit references a PR New Synopsis: Re: standards/175453: commit references a PR State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Wed Feb 6 01:59:43 UTC 2013 State-Changed-Why: Misfiled followup to standards/175453; content migrated. Responsible-Changed-From-To: gnats-admin->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Wed Feb 6 01:59:43 UTC 2013 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=175866 From owner-freebsd-standards@FreeBSD.ORG Wed Feb 6 21:38:37 2013 Return-Path: Delivered-To: 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 5BE04815 for ; Wed, 6 Feb 2013 21:38:37 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) by mx1.freebsd.org (Postfix) with ESMTP id 26E8FBF1 for ; Wed, 6 Feb 2013 21:38:37 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 729991200BA; Wed, 6 Feb 2013 22:38:20 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 373972848C; Wed, 6 Feb 2013 22:38:20 +0100 (CET) Date: Wed, 6 Feb 2013 22:38:20 +0100 From: Jilles Tjoelker To: Konstantin Belousov Subject: Re: ERESTART translation in kern_openat() Message-ID: <20130206213819.GA82715@stack.nl> References: <20130204183117.GD2522@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130204183117.GD2522@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 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: Wed, 06 Feb 2013 21:38:37 -0000 On Mon, Feb 04, 2013 at 08:31:17PM +0200, Konstantin Belousov wrote: > you noted somewhere that the unconditional translation of the ERESTART > to EINTR, performed by kern_openat(), is wrong. I mostly agree with > your statement, e.g. it is definitely wrong for fifos, but translation > itself is useful for devfs, in my opinion. E.g., you do not want > the tape unwind to be restarted this way. > I propose not to remove the translation, but limit it to devfs only. > See the patch below. > Any comments ? Please commit. A note in the man page may be useful, like: If a blocking open of a device is interrupted by a signal, the call always fails with [EINTR] even if SA_RESTART is set for the signal. A blocking open of a fifo is restarted as normal. > diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c > index 9851229..7da9b11 100644 > --- a/sys/fs/devfs/devfs_vnops.c > +++ b/sys/fs/devfs/devfs_vnops.c > @@ -1089,8 +1089,11 @@ devfs_open(struct vop_open_args *ap) > > vn_lock(vp, vlocked | LK_RETRY); > dev_relthread(dev, ref); > - if (error) > + if (error != 0) { > + if (error == ERESTART) > + error = EINTR; > return (error); > + } > > #if 0 /* /dev/console */ > KASSERT(fp != NULL, ("Could not vnode bypass device on NULL fp")); > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > index 1a5f2ae..dd1232c 100644 > --- a/sys/kern/vfs_syscalls.c > +++ b/sys/kern/vfs_syscalls.c > @@ -1106,8 +1106,6 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, > goto success; > } > > - if (error == ERESTART) > - error = EINTR; > goto bad; > } > td->td_dupfd = 0; -- Jilles Tjoelker