emacs-devel
[Top][All Lists]
Advanced

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

Re: URL not following some 302 redirects after recent changes


From: Kim F. Storm
Subject: Re: URL not following some 302 redirects after recent changes
Date: Thu, 22 Feb 2007 02:38:07 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

What happened to the following patch (+ RMS' suggestion to use
an integer instead of the sentinel-inhibited symbol) ??

I've added the bug to FOR-RELEASE.



Chong Yidong <address@hidden> writes:

> Richard Stallman <address@hidden> writes:
>
>> Here's one idea.  Instead of setting the sentinel temporarily to nil,
>> set it temporarily to `sentinel-temporarily-inhibited'.  That would be
>> ignored just as nil is ignored.
>>
>> On restoring the sentinel, if its current value isn't
>> `sentinel-temporarily-inhibited', just discard the old value instead
>> of restoring it.
>>
>> This would prevent recursion just like the current code, but sentinels
>> that set the sentinel would work once again.
>>
>> Does anyone see a problem with this fix?
>
> Only that it's a rather deep change for the current stage of the
> release (especially considering that the current behavior of sentinels
> has been in place since Emacs 21), but it's your call.  If you like, I
> can check in the following patch, which implements this idea (plus the
> appropriate doc updates).  I have verified that it solves the bug too.
>
> *** emacs/src/process.c.~1.498.~      2007-01-21 08:39:11.000000000 -0500
> --- emacs/src/process.c       2007-02-02 12:04:42.000000000 -0500
> ***************
> *** 152,157 ****
> --- 152,158 ----
>   Lisp_Object Qrun, Qstop, Qsignal;
>   Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten;
>   Lisp_Object Qlocal, Qipv4, Qdatagram;
> + Lisp_Object Qsentinel_inhibited;
>   #ifdef AF_INET6
>   Lisp_Object Qipv6;
>   #endif
> ***************
> *** 6554,6560 ****
>   exec_sentinel_unwind (data)
>        Lisp_Object data;
>   {
> !   XPROCESS (XCAR (data))->sentinel = XCDR (data);
>     return Qnil;
>   }
>   
> --- 6555,6563 ----
>   exec_sentinel_unwind (data)
>        Lisp_Object data;
>   {
> !   if (EQ (XPROCESS (XCAR (data))->sentinel,
> !       Qsentinel_inhibited))
> !     XPROCESS (XCAR (data))->sentinel = XCDR (data);
>     return Qnil;
>   }
>   
> ***************
> *** 6592,6600 ****
>     if (NILP (sentinel))
>       return;
>   
> !   /* Zilch the sentinel while it's running, to avoid recursive invocations;
> !      assure that it gets restored no matter how the sentinel exits.  */
> !   p->sentinel = Qnil;
>     record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel));
>     /* Inhibit quit so that random quits don't screw up a running filter.  */
>     specbind (Qinhibit_quit, Qt);
> --- 6595,6604 ----
>     if (NILP (sentinel))
>       return;
>   
> !   /* Set the sentinel to Qsentinel_inhibited while it's running, to
> !      avoid recursive invocations.  It gets restored when the sentinel
> !      exits, unless a new sentinel has been set.  */
> !   p->sentinel = Qsentinel_inhibited;
>     record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel));
>     /* Inhibit quit so that random quits don't screw up a running filter.  */
>     specbind (Qinhibit_quit, Qt);
> ***************
> *** 7031,7036 ****
> --- 7035,7042 ----
>     staticpro (&Qlisten);
>     Qlocal = intern ("local");
>     staticpro (&Qlocal);
> +   Qsentinel_inhibited = intern ("sentinel-inhibited");
> +   staticpro (&Qsentinel_inhibited);
>     Qipv4 = intern ("ipv4");
>     staticpro (&Qipv4);
>   #ifdef AF_INET6

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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