-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
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?