die(): workaround for freeze on old bash versions
die(): workaround for freeze on old bash versions

bin/modernish:
- Old bash versions freeze on executing 'exit' after encountering
  'command exec' anywhere in the script (as 'exec' is a "special
  builtin", prefixing 'command' is needed to avoid exiting the
  shell on a failed redirection).
  So avoid the method of saving stdin with 'command exec'. Instead,
  first check that stdin is open (in a rather convoluted way that
  is bug-compatible down to bash 2.05b; a simple lone redirection
  does *not* work on old bash), and then copy stdin by attaching
  the redirection to the background job block instead of exec'ing.

modernish/modernish