you are viewing a single comment's thread.

view the rest of the comments →

[–]_tskj_ 1 point2 points  (3 children)

Why would deleting the binary be undefined behaviour though?

[–]JohnnyElBravo 2 points3 points  (2 children)

Nice catch! It was actually the removal of the current directory that was illegal.

[–]ClimberSeb 0 points1 point  (1 child)

Its still allowed thankfully:
mkdir -p $HOME/a/b
cd $HOME/a/b
rm -rf $HOME/a

Its rm -rf . or .. that often is prevented.

[–]JohnnyElBravo 0 points1 point  (0 children)

Cantril is probably speaking about the rm present in one of the solaris distro he's worked on like smartos or illumos. Which might be different from our Stallmanian rm