Date: Thu, 14 Sep 2000 19:29:08 -0500 (CDT) From: Mike Meyer <mwm@mired.org> To: Zhiui Zhang <zzhang@cs.binghamton.edu> Cc: questions@freebsd.org Subject: Re: write to terminal in a background process Message-ID: <14785.27988.529047.912155@guru.mired.org> In-Reply-To: <125711520@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Zhiui Zhang writes:
> I thought a background process can not write to terminal. It will get a
> signal if trying to do so. But someone presents me a small program:
No, it *may* not be able to write to the terminal, depending on the
terminals modes. See "man stty", particularly the "tostop" option.
> #include
> main()
> {
> printf("printing\n");
> }
>
> $ a.out &
>
> and it does print. Can anyone explain this to me? Thanks.
Try
$ stty tostop
$ a.out &
and see what it does (or maybe it's "stty -tostop").
<mike
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14785.27988.529047.912155>
