Menu ▾ ▴

#2086 ADDRESS WITH INPUT STEM hangs when stem has 0 elements

5.3.0
accepted
Erich
None
tests
3
10 hours ago
2026-09-23
No
in.0 = 0
address system "cat" with input stem in.
say "done, rc="rc

This should exit with rc 0, but it hangs.

Discussion

  • Josep Maria Blasco

    Claude reports that the fix should consist of moving close(pipe) out of the if in interpreter/platform/unix/SystemCommands.cpp, InputWriterThread::dispatch. I leave that to the cpp experts.

    if (inputBuffer != NULL && bufferLength > 0)
    {
        if (write(pipe, inputBuffer, bufferLength) < 0) { ... }
        close(pipe);
    }
    
     
  • Erich

    Erich - 10 hours ago
    • status: open --> accepted
    • assigned_to: Erich
    • Pending work items: none --> tests
    • Priority: 5 --> 3
     
  • Erich

    Erich - 10 hours ago

    fixed code and added test with revision [r13263]

     

    Related

    Commit: [r13263]

Anonymous
Anonymous

Add attachments
Cancel