From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8085F1F601 for ; Fri, 2 Dec 2022 10:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1669976064; bh=VW3lOE7j6TyAhmbSXoyPbn666+9IgSYGlktBsylHvWo=; h=Date:From:To:Subject:References:In-Reply-To:From; b=UB7X8VZK5dreJvAezS/nkpmUBIF/Vl8lhhsrCzLhF693V3R2BBCICmv8ri8LAKRZq CR43HnJ/ehtVdfFo1x7+aaWYwNklm6NjwSqV+ghtbjzaowLXJjvAahApUgqxODgNjp AzNSBXQ3PBJtW8PuIJFW3n/QT5uCLiBn3bkv7TgY= Date: Fri, 2 Dec 2022 10:14:24 +0000 From: Eric Wong To: mwrap-perl@80x24.org Subject: Re: [PATCH v2 1/2] use file-backed mmap on Linux Message-ID: <20221202101424.M322283@dcvr> References: <20221130210837.17163-1-e@80x24.org> <20221130210837.17163-2-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221130210837.17163-2-e@80x24.org> List-Id: Eric Wong wrote: > + fd = open(tmpdir, O_TMPFILE|O_RDWR|S_IRUSR); Erm, missing S_IWUSR bit :x pushed with the following: diff --git a/mymalloc.h b/mymalloc.h index 94f2c7a..7b18486 100644 --- a/mymalloc.h +++ b/mymalloc.h @@ -49,7 +49,7 @@ static void *my_mmap(size_t size) if (!tmpdir) tmpdir = "/tmp"; - fd = open(tmpdir, O_TMPFILE|O_RDWR|S_IRUSR); + fd = open(tmpdir, O_TMPFILE|O_RDWR|S_IRUSR|S_IWUSR); if (fd < 0) { flags |= MAP_ANONYMOUS; } else {