Page MenuHomePhabricator

Avoid leaving stdin in nonblocking mode after a modern prompt
ClosedPublic

Authored by epriestley on May 30 2021, 8:31 AM.
Tags
None
Referenced Files
F15592256: D21666.diff
Sat, May 10, 4:29 AM
F15575815: D21666.id.diff
Tue, May 6, 7:06 AM
F15552546: D21666.diff
Sun, Apr 27, 9:24 PM
F15544686: D21666.id.diff
Sat, Apr 26, 6:34 AM
F15533045: D21666.id51561.diff
Wed, Apr 23, 6:08 PM
F15530090: D21666.id51562.diff
Wed, Apr 23, 1:31 AM
F15523666: D21666.diff
Mon, Apr 21, 2:53 AM
F15498758: D21666.id51562.diff
Sun, Apr 13, 2:08 PM
Subscribers
None

Details

Summary

Ref T13649. Currently, "arc" may leave stdin nonblocking after showing a prompt. This can cause various odd behaviors down the line.

I can't immediately reproduce this behavior on macOS in "zsh" or "bash" (I'm unable to get stdin to remain nonblocking beyond the process lifespan), and also don't have pcntl locally so there's a fair amount of handwaving here.

Test Plan

This is somewhat speculative since I can't immediately reproduce the behavior. I tested the locally-reachable paths (no pcntl) but they're not interesting.

Diff Detail

Repository
rARC Arcanist
Branch
prompt2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 25368
Build 35025: Run Core Tests
Build 35024: arc lint + arc unit

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.May 30 2021, 8:31 AM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.