Skip to content

minorbug(env): when using a/ with -S or without it, an unknown error reported #12778

@HackingRepo

Description

@HackingRepo

Hi, uutils mainteners

that is a minor bug with the env command when passing a/ it shows an unknown handled error

relunsec@relunsec:~/software/coreutils/target/debug$ ./env a/
env: unknown error: execvp failed
relunsec@relunsec:~/software/coreutils/target/debug$ 
relunsec@relunsec:~/software/coreutils/target/debug$ ./env -S $'a/'
env: unknown error: execvp failed
relunsec@relunsec:~/software/coreutils/target/debug$ 

the strace confirms the syscall fails but the uutils env not handle the error

execve("a/", ["a/"], 0x7ffc1ed16f10 /* 74 vars */) = -1 ENOTDIR (Not a directory)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions