bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10483: [PATCH] cperl-mode: Avoid endless loop


From: Harald Jörg
Subject: bug#10483: [PATCH] cperl-mode: Avoid endless loop
Date: Tue, 1 Sep 2020 18:12:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

[Re-sent to list: my first reply went to Eli Zaretskii only.  Sorry.]
On 8/31/20 8:49 PM, Eli Zaretskii wrote:
>> Cc: 10483@debbugs.gnu.org
>> From: Harald Jörg <haj@posteo.de>
>> Date: Mon, 31 Aug 2020 20:08:06 +0200
>>
>> I was hesitating in this particular case because _if_ this issue ever
>> happens again, then the test just hangs forever.
>>
>> Is there a safeguard against this?
> 
> You could run the test in a subordinate Emacs process, and have the
> parent process wait for it to complete with a timeout.

So be it: My attempt to do this is attached, together with tests
to verify that my loop termination isn't harmful to the function.

As always, a review is welcome. I still haven't much experience
in Elisp.  I haven't found examples to steal from, and also missed
the fork/waitpid stuff which I use for such tasks in Perl.
-- 
Cheers,
haj

Attachment: 0001-2020-09-01-Harald-J-rg-haj-posteo.de.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]