move _GNU_SOURCE define to the Makefile
check the return value of `prctl`
set the root of the mount namespace
rephrase the comment about MS_PRIVATE
move handling of inputs events to a function
move handling of output events to functions
factor out another repeated error checking pattern
give a more detailed mount error