program-startup

Linux: how to detect how a process was started

How can my program detect how it was started: by someone using the command-line or by another process? The program has an optional interactive part that I want to suppress when it was started by another process - running in the background; but when it was started from a terminal I want it to do the interactive bit. [edit] If it is poss...