Run in foreground

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