Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E6128431FD0 for ; Thu, 10 Nov 2011 11:26:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aaBu+ueT3PSk for ; Thu, 10 Nov 2011 11:26:13 -0800 (PST) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by olra.theworths.org (Postfix) with ESMTP id 65AD6431FB6 for ; Thu, 10 Nov 2011 11:26:13 -0800 (PST) X-AuditID: 1209190c-b7f806d0000008d6-29-4ebc25526a4d Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id 1D.AD.02262.2552CBE4; Thu, 10 Nov 2011 14:26:10 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id pAAJQ9G5030155; Thu, 10 Nov 2011 14:26:10 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pAAJQ7B6021503 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Thu, 10 Nov 2011 14:26:08 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1ROaIe-0001h7-9K; Thu, 10 Nov 2011 14:28:36 -0500 Date: Thu, 10 Nov 2011 14:28:36 -0500 From: Austin Clements To: Jameson Graef Rollins Subject: Re: [PATCH] test: Use env to set TMPDIR when running emacs in screen. Message-ID: <20111110192836.GN2658@mit.edu> References: <1320944375-29843-1-git-send-email-jrollins@finestructure.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1320944375-29843-1-git-send-email-jrollins@finestructure.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPIsWRmVeSWpSXmKPExsUixCmqrRukusfP4OBdGYs9+7wsrt+cyezA 5HH3NJfHs1W3mAOYorhsUlJzMstSi/TtErgyJszcxVJwg7Pix+aZ7A2MZ9m7GDk5JARMJB5M O8UCYYtJXLi3ng3EFhLYxyjx4p1UFyMXkL2BUWLllDZ2iMRJJolpu4QgEksYJZafWcEMkmAR UJU48Gk1mM0moCGxbf9yRhBbRMBMoufLHzCbWUBLYuvGD2C2sICfxLxLc4C2cXDwCmhLHJgh BDG/QmLek3VgR/AKCEqcnPmEBab1xr+XTCDlzALSEsv/cYCEOQW8JQ707AQrFxVQkZhychvb BEahWUi6ZyHpnoXQvYCReRWjbEpulW5uYmZOcWqybnFyYl5eapGuoV5uZoleakrpJkZwOEvy 7GB8c1DpEKMAB6MSDy/Xn91+QqyJZcWVuYcYJTmYlER5i5T2+AnxJeWnVGYkFmfEF5XmpBYf YpTgYFYS4eUWAcrxpiRWVqUW5cOkpDlYlMR5D+5w8BMSSE8sSc1OTS1ILYLJynBwKEnwTlAB ahQsSk1PrUjLzClBSDNxcIIM5wEavhekhre4IDG3ODMdIn+KUVFKnHcGSEIAJJFRmgfXC0s3 rxjFgV4R5j0GUsUDTFVw3a+ABjMBDd7svhtkcEkiQkqqgdFa8oZfW5JNKMfJ5hkV0unNMbvb Cx7GLD/Dwpj2dF1GkTjT0/j/TFxmR+eIvJ6ax504M3j3V74PD03ZZe8UPjd99W6Ly6I/LtLJ JQs/78q9xyrk5yAiLDxhzfygtlf9JbyPjOTE95mYi984rN8kblanvXtphLSmjvd+G71l/zrK Ltv4l38XV2Ipzkg01GIuKk4EAEScCSoSAwAA Cc: Notmuch Mail X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Thu, 10 Nov 2011 19:26:14 -0000 This looks good to me, though it would be good to add a comment explaining why this dance is necessary. Perhaps something along the lines of # The emacs server places its socket in TMPDIR, but ld.so unsets # TMPDIR when loading setgid binaries like screen, so we must # explicitly pass TMPDIR through to emacs. Quoth Jameson Graef Rollins on Nov 10 at 8:59 am: > This is to get around a bug where screen unsets TMPDIR. This causes > problems for users who set TMPDIR to something other than it's default > (/tmp). > --- > test/test-lib.sh | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/test/test-lib.sh b/test/test-lib.sh > index ff5183f..108537e 100755 > --- a/test/test-lib.sh > +++ b/test/test-lib.sh > @@ -842,7 +842,9 @@ test_emacs () { > if [ -z "$EMACS_SERVER" ]; then > EMACS_SERVER="notmuch-test-suite-$$" > # start a detached screen session with an emacs server > - screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \ > + screen -S "$EMACS_SERVER" -d -m \ > + env TMPDIR="$TMPDIR" \ > + "$TMP_DIRECTORY/run_emacs" \ > --no-window-system \ > --eval "(setq server-name \"$EMACS_SERVER\")" \ > --eval '(server-start)' \