From: Chong Yidong <cyd@stupidchicken.com>
Subject: Re: a bug of read-passwd
Date: Fri, 21 Jul 2006 15:33:08 -0400 [thread overview]
Message-ID: <87zmf2sqh7.fsf@stupidchicken.com> (raw)
In-Reply-To: <874pxau66i.fsf@stupidchicken.com> (Chong Yidong's message of "Fri, 21 Jul 2006 15:08:37 -0400")
>> (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)))
>
> I can reproduce this too. I'll look into it.
The problem here is that the new sit-for calls (read-event) to wait
for new input. During this time, the process filter takes over, and
that calls (read-passwd). While the filter is waiting for the
password prompt, the sit-for timer expires, which causes a throw back
to the `sit-for', spoiling the `read-passwd'.
Not sure how to handle this situation (though, as I mentioned earlier,
the proper thing to do in this situation is to run
`accept-process-output').
next prev parent reply other threads:[~2006-07-21 19:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zmf2sqh7.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).