Wed, 5 Apr 2006
switchsh.c
switchsh is a tiny program which can be used to temporarily change /bin/sh only for its child processes.
It's primary use is running broken scripts using bashisms when your default /bin/sh is dash or to check that your packages are free of bashisms when your default shell is bash.
It shows how to use bind mounts, CLONE_NEWNS and the clone(2) and unshare(2) Linux system calls.