From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7783 invoked by alias); 7 Oct 2016 12:59:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7758 invoked by uid 89); 7 Oct 2016 12:59:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Doctor, interrupted, continuously, GFortran X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wm0-f47.google.com Received: from mail-wm0-f47.google.com (HELO mail-wm0-f47.google.com) (74.125.82.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Oct 2016 12:59:28 +0000 Received: by mail-wm0-f47.google.com with SMTP id i130so36871080wmg.1; Fri, 07 Oct 2016 05:59:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jypkcQz/l68GiHnV4hLj5Kvr7P+zr5VNfbDoKxbhxyY=; b=DLIq4+WPcfcmaYWDCDT2kAGlc5ew27DM5qTm/omAYriHhMqpb0WJaFeVwpR7IVUH1V OxLuAyJ5aN9p8uTFiAI5bebQkUpsAyI7tPIv3DcRwEblBW2FTwTSXSwur/92iV14s9CP uUHGGd+jI6WPSqzNdQMGwJSQmkJkN1lKPBiFJZYYUWvDJcpfl9/eDp/JwUTDiq5dMAZB aMIUoZIOVFNKDmnyiY1DVMEphH958Q1vHoVwGqR/G3+3dWG6Ia1O7MeCmxqoi1FlAvs1 8NtQrkugostFDgAmyOpDlKOXRbNBLVm+QSDYIQyYikxyEv9zzwG+zq0R1Eoux/T4ZMnX cnpA== X-Gm-Message-State: AA6/9RnOHzYBNR81CcCl7+wFXHFAeOfn+qFmV9FJUwjk5bHXcT+munFA0QHmRgnG++UNGCYPjVZEkMY1Piu65Q== X-Received: by 10.194.107.137 with SMTP id hc9mr19034725wjb.158.1475845166515; Fri, 07 Oct 2016 05:59:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.173.36 with HTTP; Fri, 7 Oct 2016 05:59:25 -0700 (PDT) In-Reply-To: References: <1475843186-3429-1-git-send-email-blomqvist.janne@gmail.com> From: Janne Blomqvist Date: Fri, 07 Oct 2016 12:59:00 -0000 Message-ID: Subject: Re: [PATCH, libgfortran] PR 67585 Handle EINTR To: FX Cc: Fortran List , GCC Patches Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-10/txt/msg00485.txt.bz2 On Fri, Oct 7, 2016 at 2:41 PM, FX wrote: >> Many POSIX systems have the bad habit of not restarting interrupted >> syscalls. On these systems it's up to the user to check for an error >> with errno == EINTR and restart manually. This patch does this for >> libgfortran, so that GFortran users don't have to do it. > > I have not much experience with EINTR, but is it garanteed that those EINTR loops will never cycle forever? Hmm, no I don't think so, but I don't think it'll be a problem. So on systems where syscalls are not restarted automatically, EINTR happens when the process receives a signal while blocked in a system call [1]. So I suppose in theory you could have a situation where something continuously fires signals at the process, and the result is some kind of race between the process restarting the syscall which then never manages to complete before being interrupted again. But I think this goes into the "Doctor, this hurts! Then don't do that" territory. There's some more info in https://www.python.org/dev/peps/pep-0475/ (Python nowadays does the same as this patch). > > Apart from that, OK to commit. > > FX -- Janne Blomqvist