Skip to content

os: File.Close() regression - Close hangs while reader present #23943

Closed
@gdamore

Description

@gdamore

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.10

Does this issue reproduce with the latest release?

Yes, and it is a regression.

What operating system and processor architecture are you using (go env)?

go version go1.10 darwin/amd64

What did you do?

tcell (github.com/gdamore/tcell) is broken by the latest go 1.10 (works fine on 1.9.x).

We have an input loop that spins reading stdin (to scan for keypresses.)

When the program wants to terminate, we call Close() on that, to clean up things. We expect the input loop to fail with io.EOF or nil and for Close() to terminate immediately.

Instead Close() now hangs, until the user presses a key, and the check for closed file then succeeds.

It would appear that Close() no longer is thread safe, and no longer just calls the underlying OS close function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Darwin

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions