cp.c and rm.c embedded in mv(1)

2020-02-10 Thread Jan Stary
mv code contains copies of cp.c and rm.c - is that so that mv can avoid the fork+exec (and call the relevant cp/rm code itself)? If so, is it so that mv can be pledged? It isn't. There must be something worth the duplication ... Jan

cp.c and rm.c embedded in mv(1)

2016-10-11 Thread Jan Stary
mv's copies of cp.c and rm.c were imported about 10 months ago so that mv can avoid the fork+exec; instead, mv just calls the relevant cp/rm code itself. What was the motivation for that? Was that a step needed to have a stricter pledge() for mv (no forking and execing)? Currently, mv does not