home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!matt.ksu.ksu.edu!news
- From: probreak@matt.ksu.ksu.edu (James Michael Chacon)
- Newsgroups: comp.unix.admin
- Subject: Re: process running in background
- Date: 22 Jan 1993 12:46:01 -0600
- Organization: Kansas State University
- Lines: 16
- Message-ID: <1jpfd9INNl5e@matt.ksu.ksu.edu>
- References: <1993Jan22.143824.16929@relay.nswc.navy.mil>
- NNTP-Posting-Host: matt.ksu.ksu.edu
-
- rweisbe@starfleet.nswc.navy.mil (Bob Weisbeck) writes:
-
- > Sorry if this is not the right group for this but;
- >I have a process that the users might run in the background.
- >I would like the process to determine if it is running in
- >the background so that I can suppress messages to stdout.
- >Anyone have any ideas?
-
- >Thanks in advance.
-
- >Bob
-
- Try calling isatty on file descriptor 1. This should be standard out,
- and isatty will tell you if its connected to a terminal.
-
- James
-