GNU bug report logs - #13299
24.3.50; Tramp adb and device not found

Previous Next

Package: emacs;

Reported by: nyc4bos <at> aol.com

Date: Fri, 28 Dec 2012 21:30:02 UTC

Severity: normal

Merged with 13381, 13383

Found in version 24.3.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 13299 <at> debbugs.gnu.org, nyc4bos <at> aol.com
Subject: bug#13299: 24.3.50; Tramp adb and device not found
Date: Mon, 18 Mar 2013 18:36:37 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> There is the following code:
>> 
>>   (with-timeout (10)
>>     (with-temp-buffer
>>       (when (zerop (call-process tramp-adb-program nil t nil "devices"))
>>       ...
>> 
>> No problem under GNU/Linux. Under MS Windows, the timeout does not
>> interrupt the `call-process' form, when it is overdued. That's why I
>> have replaced it with a `start-process' implementation.
>
> Hmm... can you describe how this works on Posix platforms?  Once
> call-process forks the child process, it is AFAICS blocked inside
> waitpid, so how do Emacs timers (which are the basis for with-timeout)
> succeed to run at all?  What am I missing?

I haven't digged too much. Likely, it works under GNU/Linux because any
"adb devices" call returns in time, successful or not.

On MS Windows, the very first call of "adb devices" does not return in
the case no Android device is connected. Once adb runs on MS Windows,
any further call of "adb devices" returns in time.

So there is no difference in the timeout behaviour of Emacs. But since I
don't test on MS WIndows usually, it took that time to understand/fix
the problem for me.

Best regards, Michael.




This bug report was last modified 11 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.