Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 15e57686be89e58f68f38b4f2367fdf33a8936d0
Ticket: 218076ffffffffffffffffffffffffffffffffff
GetInput() doesn't allow for result=EINTR
User & Date: nobody on 2000-10-26 00:52:54
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1631 Bug
    Version: 8.0.3
    SubmitDate: '1999-03-25'
    LastModified: '2000-10-25'
    Severity: SER
    Status: Closed
    Submitter: pat
    OS: HP-UX
    OSVersion: 10.2
    Machine: Other
    FixedDate: '2000-10-25'
    FixedInVersion: NA
    ClosedDate: '1999-04-19'
    
    
    Name:
    
    Willi Lohmann
    
    
    CVS:
    
    tclIO.c 1.244 96/11/12 14:47:28
    
    
    Extensions:
    
    none
    
    
    CustomShell:
    
    Have redefined the following to add a couple of args (they just call the real version after checking for the additional args - no actual new functionality):
    
    
    ReproducibleScript:
    
        Reproducing this is hit or miss.  I have applications
    
        that seemingly do the same thing, but one works and one
    
        fails.  Its extremely dependent on the user's os environment
    
        and how many interrupts are occuring.  Sorry (but I have
    
        the fix).
    
    
    ObservedBehavior:
    
        Within GetInput's while (1) loop, one of the possible read errno values
    
        is EINTR.  This means some system interrupt interrupted the io
    
        operation.
    
        Nothing bad happened and the io needs to be continued.  But its
    
        currently
    
        being treated as a hard io error.
    
    
        When running with a lot of interrupts (like itimers to do ui updates)
    
        this
    
        happens all the time on some os's (like hpux) when a tcl exec command is
    
        executed and return data is being read.  I have heard from someone who
    
        has
    
        seen this on solaris also.
    
    
    DesiredBehavior:
    
        I want to see exec not return a "interrupted system call" error.
    
    
    Patch:
    
    Simply changing this line in GetInput():
    
    
    if ((result == EWOULDBLOCK) || (result == EAGAIN)) {
    
    
    to
    
    
    if ((result == EWOULDBLOCK) || (result == EAGAIN) || (result == EINTR)) {
    
    
    seems to fix the problem.
    
    
    PatchFiles:
    
        tckIO.c
    
    
    
    
    4/19/99 - redman - Not a bug. The code should specifically NOT check for EINTR to allow programs to handle and deal with it correctly.
    
    
    
  4. foundin changed to: "obsolete: 8.0.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "GetInput() doesn't allow for result=EINTR"
  11. type changed to: "Bug"