Run in foreground

Let an app be able to run in foreground.

An app may check for the presence of  APPSH_FOREGROUND variable so it knows that it should not redirect output.