Background and foreground jobs are determined by process group. A background process (job) will have a different process group than the terminal. You get the terminal process group with TIOCGPGRP as described in tty(4). Compare this with getpgrp(2). -- C knows no bounds. Jeff Anton U.C.Berkeley ucbvax!anton anton at berkeley.ARPA