unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [kazu@iij.ad.jp: a bug of read-passwd]
@ 2006-07-15 17:16 Richard Stallman
  2006-07-16  3:54 ` Chong Yidong
  0 siblings, 1 reply; 19+ messages in thread
From: Richard Stallman @ 2006-07-15 17:16 UTC (permalink / raw)


I wonder if this is a consequence of the new sit-for code.
Would someone please investigate, then ack this message?

------- Start of forwarded message -------
DKIM-Signature: a=rsa-sha1; c=relaxed/simple; d=iij.ad.jp; s=omgo0;
	t=1152939160; bh=3mhCZUjonim4IiCzzKXwlGTyEu8=; h=Received:Received:
	Date:Message-Id:To:Subject:From:X-Mailer:Mime-Version:Content-Type:
	Content-Transfer-Encoding; b=NYBNO/qQoOsroMzwkHp6O7uqWNe+Vhjlofn0m1
	CrNZrspQa6+N/HXDG3p5UepfAwt+dX1CtHd3Dxc8zuWmqePgbUq2wdLE+OFSdUW6F2W
	qN4QWThGMEPiM599VkzY8FDelF5emurJNv1Yqvyjwq1izfE39MKa6LLnB6ADVMVK4A=
Date: Sat, 15 Jul 2006 13:49:49 +0900 (JST)
To: emacs-devel@gnu.org
From: Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=) <kazu@iij.ad.jp>
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Subject: a bug of read-passwd
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4

Hello,

Recent changes of Emacs introduces a new bug to read-passwd.  If
read-passwd is called a filter of an asynchronous process and the
parent code executes sit-for, the cursor goes away from the minibuffer
and we cannot input our password.

The following code can reproduce this:

(defvar my-check nil)

(defun my-filter (process string)
  (set-buffer (process-buffer process))
  (read-passwd "Password: ")
  (setq my-check nil))

(let ((pro (start-process "*sh*" (current-buffer) "/bin/sh")))
  (setq my-check t)
  (set-process-filter pro 'my-filter)
  (while my-check
    (sit-for 0.1)
    (discard-input)))

The parent code calls sit-for to synchronize with its child process.
The code above is essence of a program which I use everyday.

This code works Emacs, at least, before Jun 31 2006.

- --Kazu Yamamoto


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 19+ messages in thread
* a bug of read-passwd
@ 2006-07-15  4:49 Kazu Yamamoto
  0 siblings, 0 replies; 19+ messages in thread
From: Kazu Yamamoto @ 2006-07-15  4:49 UTC (permalink / raw)


Hello,

Recent changes of Emacs introduces a new bug to read-passwd.  If
read-passwd is called a filter of an asynchronous process and the
parent code executes sit-for, the cursor goes away from the minibuffer
and we cannot input our password.

The following code can reproduce this:

(defvar my-check nil)

(defun my-filter (process string)
  (set-buffer (process-buffer process))
  (read-passwd "Password: ")
  (setq my-check nil))

(let ((pro (start-process "*sh*" (current-buffer) "/bin/sh")))
  (setq my-check t)
  (set-process-filter pro 'my-filter)
  (while my-check
    (sit-for 0.1)
    (discard-input)))

The parent code calls sit-for to synchronize with its child process.
The code above is essence of a program which I use everyday.

This code works Emacs, at least, before Jun 31 2006.

--Kazu Yamamoto

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-07-28  3:39 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-15 17:16 [kazu@iij.ad.jp: a bug of read-passwd] Richard Stallman
2006-07-16  3:54 ` Chong Yidong
2006-07-19  0:49   ` Kazu Yamamoto
2006-07-21  0:57     ` a bug of read-passwd Kazu Yamamoto
2006-07-21 19:08       ` Chong Yidong
2006-07-21 19:33         ` Chong Yidong
2006-07-24  2:24           ` Kazu Yamamoto
2006-07-22  4:39         ` Richard Stallman
2006-07-24  4:18           ` Chong Yidong
2006-07-24  4:54           ` Chong Yidong
2006-07-24 13:22             ` Stefan Monnier
2006-07-24 14:17               ` Chong Yidong
2006-07-24 14:38                 ` Stefan Monnier
2006-07-25  3:09             ` Richard Stallman
2006-07-26 18:33               ` Chong Yidong
2006-07-27  0:25                 ` Richard Stallman
2006-07-27  0:34                   ` Yidong Chong
2006-07-28  3:39                   ` Kazu Yamamoto
  -- strict thread matches above, loose matches on Subject: below --
2006-07-15  4:49 Kazu Yamamoto

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).