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...
In reply to Re^5: Detecting forground and background process
by almut
in thread Detecting forground and background process
by astroboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |