Is it possible to determine whether or not a given running process is interactive or merely daemon-like (i.e. an actual daemon, or a tail -f, or similar) using scripting or any other language?
If so, how?
Is it possible on more than one platform (I use bash most often, but solutions in other shells - even PowerShell - would be appreciated, too)?