You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use O_NOCTTY flag in .NET APIs that open files. #129156
File and FileStream are currently not including the O_NOCTTY flag when opening files on Unix. Without this flag, if the process has no controlling terminal and the path that is opened is a terminal, it becomes the controlling terminal.
This is probably not what the user is expecting and it may introduce issues. For example, opening a serial port device which then gets disconnected would send a hangup signal to the .NET process which will terminate the process.
Activity
adamsitnik commentedon Jun 9, 2026
@tmds it sounds very reasonable, would you like to send a PR?
tmds commentedon Jun 9, 2026
Sure!
FileStream.Unix: prevent open to cause setting the controlling termin…
FileStream.Unix: prevent open to cause setting the controlling termin…
FileStream.Unix: prevent open to cause setting the controlling termin…