From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 14703138247 for ; Wed, 18 Dec 2013 02:53:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A622E0AEE; Wed, 18 Dec 2013 02:53:02 +0000 (UTC) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C405DE0AEA for ; Wed, 18 Dec 2013 02:53:01 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id as1so9618762iec.13 for ; Tue, 17 Dec 2013 18:53:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=iL+rtlTsEw7Bf4GZrF5AX9Q4Lq5gcHdoLBKQx9i6nFo=; b=XFsredua3TENyzkA81v3euJuP4q7At4ZmjCCD+4l4ZbHYJrQJZILftS2S0TrHR4Tm9 ryINuLIWnVBey8WxQyh7LygAHxrGjZvbF43IL7EZUNjkUgXKRdo8V+XAl2s6MqKHuPJ5 goa4c6KlPHkSSLxWEBo61IauVim2bjnJymgvxe/6iosWaAgKQrhL+Qv4OjnE39b55ffA +TvV4VfGvpHH0ZY26BqAq8jma1lBw35acQ3SmbzinEYq60mIfjCTuvVjzx8EY4mi1CjF pQhWjdzJqqfi/2forgLAI2K7plICr2RbS1EnABdX36ARoorbvFQVBZogeKuxyYLvueNT XZeQ== X-Gm-Message-State: ALoCoQmkEVkg7hxtZ9NZY2IDNYTejEHdV1eVtsJo8dELtBOjER15O0U+9yXpTJIrt0qA8bzTeDho Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.42.97.193 with SMTP id p1mr10171078icn.32.1387335180705; Tue, 17 Dec 2013 18:53:00 -0800 (PST) Sender: gmt@be-evil.net Received: by 10.64.91.231 with HTTP; Tue, 17 Dec 2013 18:53:00 -0800 (PST) X-Originating-IP: [75.147.143.253] In-Reply-To: References: <1387322606-3867-1-git-send-email-vapier@gentoo.org> <1387322892-13303-1-git-send-email-vapier@gentoo.org> Date: Tue, 17 Dec 2013 18:53:00 -0800 X-Google-Sender-Auth: rxN56yP66NgM25BkTV9i5BbmzyI Message-ID: Subject: Re: [gentoo-portage-dev] [PATCH] econf: update configure/config.{sub,guess} atomically to avoid races From: Greg Turner To: gentoo-portage-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: a2bdf1b8-961c-4397-a1b7-cd3fefdf01bb X-Archives-Hash: 7fc0ecf3fc1d82febdd28047690f729b On Tue, Dec 17, 2013 at 5:58 PM, Alec Warner wrote: > Sed is already atomic > > antarus@goats5 /tmp/test $ cat foo > Debian Rocks! > antarus@goats5 /tmp/test $ strace -e trace=file sed -i -e > 's/Debian/Gentoo/g' foo [snip] > open("foo", O_RDONLY) = 3 > open("/proc/filesystems", O_RDONLY) = 4 > open("./sedfDxBxl", O_RDWR|O_CREAT|O_EXCL, 0600) = 4 > rename("./sedfDxBxl", "foo") = 0 Nice demonstration! Been wondering about that... -gmt