Skip to content

improve install /dev/zero workaround #4387

@btittelbach

Description

@btittelbach

motivation

Just watched the FOSDEM 2023 talk where the workaround for install /dev/zero <target> is mentioned and shown on slide.

issue

This workaround, likely obvious to the original coder, not only breaks when used with other device files, but also if /dev/zero is named differently e.g. someone creates mknod ./zero2 c 1 3 and want to use install on it.

While that is of course, very unlikely, it still think it's bad to start making assumptions like this in the core utilities.

naive question

would it not be better to use two open, read, write instead and implement naive copying, rather than rely on a fs::copy that is broken from a unix PoV?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions