Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 672ca09a9382da28ca1e8a0349d08e2482bfba73
Ticket: 664755ffffffffffffffffffffffffffffffffff
SGI warning: tclUnixTest.c
User & Date: jenglish on 2003-10-12 01:38:01
Changes

  1. icomment:
    Logged In: YES 
    user_id=68433
    
    Full context:
        if (alarm(sec) < 0) {
            Tcl_AppendResult(interp, "alarm: ",
    Tcl_PosixError(interp), NULL);
            return TCL_ERROR;
        }
    
    However, according to alarm(2):
    
    unsigned int alarm(unsigned int seconds);
    ...
    RETURN VALUE
           alarm returns the number of  seconds  remaining 
    until  any previously scheduled alarm was due to be
    delivered, or zero if there was no previously scheduled alarm.
    
    IOW, there are no error conditions; alarm() always succeeds.
     (manpages on HP-UX, AIX, IRIX, and Linux all say something
    similar.  Also, this interface goes all the way back to SVID2).
    
    It should be safe to just say:
    
         (void)alarm(sec);
    
    instead.
    
    
    
    
  2. login: "jenglish"
  3. mimetype: "text/plain"
  4. username: "jenglish"