From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 0D71A6DE0EDC for ; Tue, 5 Nov 2019 18:24:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.06 X-Spam-Level: X-Spam-Status: No, score=-0.06 tagged_above=-999 required=5 tests=[AWL=-0.059, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IvPlIgWTNm18 for ; Tue, 5 Nov 2019 18:24:48 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 409596DE0F27 for ; Tue, 5 Nov 2019 18:24:48 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1iSB02-0005Us-A4; Tue, 05 Nov 2019 21:24:46 -0500 Received: (nullmailer pid 1695 invoked by uid 1000); Wed, 06 Nov 2019 02:22:35 -0000 From: David Bremner To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: python CFFI bindings integration into notmuch build/test In-Reply-To: References: <20191104013927.17037-1-david@tethera.net> X-List-To: notmuch Date: Tue, 05 Nov 2019 22:22:35 -0400 Message-ID: <87eeylspzo.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2019 02:24:49 -0000 Tomi Ollila writes: > alternative: > > ... > print('Invoking: {}'.format(' '.join(cmd))) > > def preexec_fn(): os.environ['NOTMUCH_CONFIG'] = str(cfg_fname) > > proc = subprocess.run(cmd, timeout=5, preexec_fn=preexec_fn) > ... > > The unix fork ... (here preexec_fn called in child) ... exec model is > superior to any other alternative ! =D I don't consider myself a good judge of python style, so I'll defer to Floris on that one. d