tdon't touch the alarm when there is no timeout - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 4cc2763a045dcd208b2970334b86431aeacb2c02
 (DIR) parent f2479500fa3de375ffb51a479b8f62492a2910e0
 (HTM) Author: rsc <devnull@localhost>
       Date:   Thu, 20 May 2004 18:21:38 +0000
       
       don't touch the alarm when there is no timeout
       
       Diffstat:
         M src/libhttpd/parsereq.c             |       6 ++++--
       
       1 file changed, 4 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/src/libhttpd/parsereq.c b/src/libhttpd/parsereq.c
       t@@ -40,10 +40,12 @@ hparsereq(HConnect *c, int timeout)
                 * later requests have to come quickly.
                 * only works for http/1.1 or later.
                 */
       -        alarm(timeout);
       +        if(timeout)
       +                alarm(timeout);
                if(hgethead(c, 0) < 0)
                        return -1;
       -        alarm(0);
       +        if(timeout)
       +                alarm(0);
                c->reqtime = time(nil);
                c->req.meth = getword(c);
                if(c->req.meth == nil){