Yet another reminder that you have to think about file IO as a concurrency problem: https://thomask.sdf.org/blog/2019/11/09/take-care-editing-bash-scripts.html
Take care editing bash scripts

Imagine I write the following bash script and call it delay.sh. What do you suppose happens when I run ./delay.sh?#!/bin/bashsleep 30#rm -rf --no-preserve-ro...

To confuse matters further, the file saving strategy differs not only between text editors but within the same text editor depending on the context. There are basically two robust strategies for file saves:

1. Write new version to newly created foo.txt~ and atomically rename foo.txt~ to foo.txt.
2. Copy backup of foo.txt to foo.txt~, overwrite foo.txt in place with new version, delete foo.txt~.

@pervognsen Another is that clang uses inode number for #pragma once so you get different errors, if you save a file mid-build, depending on if entire inode is replaced or not.