in reply to Re^4: Detecting forground and background process
in thread Detecting forground and background process

It was my impression that with "in the foreground" the OP actually meant "interactively".  And it's a matter of definition whether a process with stdin redirected (or std* for that matter) is still considered interactive.

Maybe the OP himself should clarify...

  • Comment on Re^5: Detecting forground and background process

Replies are listed 'Best First'.
Re^6: Detecting forground and background process
by afoken (Chancellor) on Jul 20, 2010 at 16:16 UTC

    Right. Given a windowed environment, one could also consider a process to be "running in the foreground" if it runs (in) the topmost window or the window that currently gets user input (from keyboard and pointing device). All other processes would be "running in the background". So, astroboy, please define "foreground" and "background".

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)