[Migrated content. Thread originally posted on 16 April 2004]
I have several programs that users run sequentially as a day end process. These same programs are run by some users as a scheduled background process using a keystroke file.If there is an unexpected errror such as a file I-O error, our standard error handler displays the error to the user and prompts them to hit enter. If this happens during the background process it causes the keystrokes to be off and the process then doesn't complete properly.
Does anyone know of any way to tell if a program is running in the background?. I'm thinking if I knew that, when running in the background I could log the error a file and not prompt the user to press enter.
One note to consider, these are not executed using the -b option to the runtime due to a runtime error we ran into using that when a program does a DISPLAY WINDOW, it determining whether it's in the background can't depend on that.
Brad Hayes



