From ttn@gnuvola.org Mon Jun 23 01:46:06 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.0 required=4.0 tests=BAYES_00,GMAIL, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jun 2008 08:46:07 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5N8k220021867 for ; Mon, 23 Jun 2008 01:46:04 -0700 Received: from mail.gnu.org ([199.232.76.166]:40256 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KAhgT-0000Lz-JU for emacs-pretest-bug@gnu.org; Mon, 23 Jun 2008 04:45:57 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KAhgT-0004zt-ND for emacs-pretest-bug@gnu.org; Mon, 23 Jun 2008 04:46:00 -0400 Received: from [151.61.141.75] (port=33978 helo=ambire.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KAhgS-0004yL-Hy; Mon, 23 Jun 2008 04:45:57 -0400 Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1KAhdh-0001aU-4g; Mon, 23 Jun 2008 10:43:05 +0200 From: Thien-Thi Nguyen To: "ken manheimer" Cc: wilde@sha-bang.de, emacs-pretest-bug@gnu.org, ueno@unixuser.org, emacs-devel Subject: Re: pgg-gpg.el - pgg-gpg-process-region timing problem References: <2cd46e7f0806221037h6d16839bp567eb5b901313375@mail.gmail.com> <87zlpc8t00.fsf@ambire.localdomain> Date: Mon, 23 Jun 2008 10:43:05 +0200 In-Reply-To: <87zlpc8t00.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Mon, 23 Jun 2008 10:17:51 +0200") Message-ID: <87r6ao8rty.fsf@ambire.localdomain> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-Greylist: delayed 1512 seconds by postgrey-1.27 at monty-python; Mon, 23 Jun 2008 04:45:54 EDT ChangeLog entry: Use process sentinel to monitor gpg subprocess status. * pgg-gpg.el (pgg-gpg-process-region): Fix omission bug: Use process sentinel to update process status and exit-status. Reported by ken manheimer . patch: *** pgg-gpg.el 6 May 2008 07:57:46 -0000 1.27 --- pgg-gpg.el 23 Jun 2008 08:40:50 -0000 *************** *** 70,111 **** ,@pgg-gpg-extra-args ,@args)) (output-buffer pgg-output-buffer) (errors-buffer pgg-errors-buffer) ! (orig-mode (default-file-modes)) ! (process-connection-type nil) ! (inhibit-redisplay t) ! process status exit-status ! passphrase-with-newline ! encoded-passphrase-with-new-line) (with-current-buffer (get-buffer-create errors-buffer) (buffer-disable-undo) (erase-buffer)) (unwind-protect ! (progn (set-default-file-modes 448) ! (let ((coding-system-for-write 'binary)) ! (setq process ! (apply #'start-process "*GnuPG*" errors-buffer ! program args))) ! (set-process-sentinel process #'ignore) (when passphrase ! (setq passphrase-with-newline (concat passphrase "\n")) ! (if pgg-passphrase-coding-system ! (progn ! (setq encoded-passphrase-with-new-line (encode-coding-string ! passphrase-with-newline ! (coding-system-change-eol-conversion ! pgg-passphrase-coding-system 'unix))) ! (pgg-clear-string passphrase-with-newline)) ! (setq encoded-passphrase-with-new-line passphrase-with-newline ! passphrase-with-newline nil)) ! (process-send-string process encoded-passphrase-with-new-line)) (process-send-region process start end) (process-send-eof process) ! (while (eq 'run (process-status process)) (accept-process-output process 5)) - (setq status (process-status process) - exit-status (process-exit-status process)) (delete-process process) (with-current-buffer (get-buffer-create output-buffer) (buffer-disable-undo) --- 70,104 ---- ,@pgg-gpg-extra-args ,@args)) (output-buffer pgg-output-buffer) (errors-buffer pgg-errors-buffer) ! (inhibit-redisplay t)) (with-current-buffer (get-buffer-create errors-buffer) (buffer-disable-undo) (erase-buffer)) (unwind-protect ! (let* ((coding-system-for-write 'binary) ! (process (let ((orig (default-file-modes))) (set-default-file-modes 448) ! (prog1 (apply #'start-process "*GnuPG*" ! errors-buffer program args) ! (set-default-file-modes orig)))) ! (status (process-status process)) ! exit-status) ! (set-process-sentinel ! process (lambda (process reason) ! (setq status (process-status process) ! exit-status (process-exit-status process)))) (when passphrase ! (process-send-string ! process (if pgg-passphrase-coding-system (encode-coding-string ! passphrase ! pgg-passphrase-coding-system) ! passphrase)) ! (process-send-string process "\n")) (process-send-region process start end) (process-send-eof process) ! (while (eq 'run status) (accept-process-output process 5)) (delete-process process) (with-current-buffer (get-buffer-create output-buffer) (buffer-disable-undo) *************** *** 120,134 **** (error "%s exited abnormally: '%s'" program exit-status)) (if (= 127 exit-status) (error "%s could not be found" program)))) - (if passphrase-with-newline - (pgg-clear-string passphrase-with-newline)) - (if encoded-passphrase-with-new-line - (pgg-clear-string encoded-passphrase-with-new-line)) - (if (and process (eq 'run (process-status process))) - (interrupt-process process)) (if (file-exists-p output-file-name) ! (delete-file output-file-name)) ! (set-default-file-modes orig-mode)))) (defun pgg-gpg-possibly-cache-passphrase (passphrase &optional key notruncate) (if (and passphrase --- 113,120 ---- (error "%s exited abnormally: '%s'" program exit-status)) (if (= 127 exit-status) (error "%s could not be found" program)))) (if (file-exists-p output-file-name) ! (delete-file output-file-name))))) (defun pgg-gpg-possibly-cache-passphrase (passphrase &optional key notruncate) (if (and passphrase From rgm@gnu.org Fri Jun 27 17:05:40 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,ONEWORD, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 28 Jun 2008 00:05:41 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5S05cWK021577 for ; Fri, 27 Jun 2008 17:05:39 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KCNwU-0007Gc-Mf; Fri, 27 Jun 2008 20:05:26 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18533.32838.630845.565243@fencepost.gnu.org> Date: Fri, 27 Jun 2008 20:05:26 -0400 From: Glenn Morris To: control@debbugs.gnu.org Subject: merge X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: red X-Ran: 0l8Y8"+,#K:tVUK4-6)g~|Bq0yDez#"#7T(`&1glAAW`CxxS4PDCnpVNF]uO#]E-9tm'k4 merge 465 469 470 471 472 474 476 486 487 From unknown Tue Jun 17 01:34:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Sun, 31 Aug 2008 14:24:04 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator