10000 `tail`: piped or redirected input on windows and android platforms is not implemented · Issue #3881 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
tail: piped or redirected input on windows and android platforms is not implemented #3881
Closed
@Joining7943

Description

@Joining7943

When input comes from a pipe or fifo on windows and android platforms there is no output and no processing of that input, at all. This is part of the problem when determining if the input is a fifo, pipe, file etc. A related issue is #3845. The if check here

if display_name.is_stdin() && path_is_tailable {

fails because path_is_tailable resolves to false because the check in path.is_tailable()

self.is_file() || self.exists() && self.metadata().unwrap().is_tailable()

returns false. On windows platforms (and I assume on android platforms, too) the statement self.is_file() || self.exists() = false resolves to false. This leads to the input not handled and silently ignored, since the if ... else if .. else if chain above misses an else branch, where I would at least expect an error message. To me, the determination of tailable and if a path is fifo, pipe looks broken and is scattered over a 2000 lines file. Wouldn't it be clearer to determine with which kind of input and files we're dealing with right from the start when parsing the settings, store what we've found in a struct or enum and then handle all cases? Looking at this big tail file. refactoring tail.rs to be clearer would help resolving the different handling of input on different platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0