Skip to content

Cannot execute binary from /proc/self/fd/N while bash can do that #12542

Description

@oech3
> fish --version
fish, version 4.5.0
> /proc/self/fd/3 --version 3</bin/bash
fish: Unknown command. '/proc/self/fd/3' exists but is not an executable file.

But with bash,

/proc/self/fd/3 --version 3</bin/bash
GNU bash, version 5.3.9(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

This is useful when I want to test binaries called from memfd_create without any programming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions