Skip to content

Unable to replace stdin/stdout/stderr with user-provided File #1840

@linouxis9

Description

@linouxis9

Because of the following checks:

if file_type == types::Filetype::RegularFile || file_type == types::Filetype::Directory {

if file_type == types::Filetype::RegularFile || file_type == types::Filetype::Directory {

And the fact that an OsOther is used here:

let handle = OsOther::try_from(f)?;

It is impossible since #1561, to replace stdin/stdout/stderr with a File descriptor pointing to a file.

I had tried fixing this issue (#1839) by simply replacing OsOther by OsFile, but obviously, this cannot work as other kinds of fd should also be supported.

What would be the course of action to fix this issue? Allowing OsOther to take a file?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions