Skip to content

Add access to stdin, stdout, stderr names somehow #2778

Open
@tbu-

Description

@tbu-
Contributor

Earlier request: #7.
Implementation attempt: #1073.

One problem with this is that these names are apparently not symbols but only macros on some operating systems. (The C standard doesn't require these to be symbols.)

Activity

thewh1teagle

thewh1teagle commented on Aug 27, 2024

@thewh1teagle

I also need to access stdout handle. Currently I'm using https://github.com/crlf0710/libc-stdhandle instead but I prefer to use it from this crate instead.
Does it possible already?

added
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
on Aug 29, 2024
added this to the 1.x milestone on Aug 29, 2024
tbu-

tbu- commented on May 5, 2025

@tbu-
ContributorAuthor

@tgross35 Definitely not E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. , it needs a decision on how to export identifiers only exposed as macros in C. errno seems to have gotten special treatment because it has libc::__errno_location, but an earlier attempt to copy that to stdin, stdout and stderr was rejected, see #1073 (comment) where it says we need an RFC to support stdin etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-API-requestCategory: API requestE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tbu-@tgross35@thewh1teagle

        Issue actions

          Add access to stdin, stdout, stderr names somehow · Issue #2778 · rust-lang/libc