Path: utzoo!mnetor!uunet!mcvax!cogpsi!tom
From: tom@cogpsi.UUCP (Tom Vijlbrief)
Newsgroups: comp.unix.wizards
Subject: Re: Unattended dumps (BSD4.3)
Message-ID: <327@cogpsi.UUCP>
Date: 8 Dec 87 15:51:57 GMT
References: <9032@santra.UUCP>
Reply-To: tom@cogpsi.UUCP (Tom Vijlbrief)
Organization: TNO Institute for Perception, Soesterberg, The Netherlands
Lines: 21

In article <9032@santra.UUCP> nispa@hutcs.hut.fi (Tapani Lindgren) writes:
>Can yes(1) somehow be piped to a program that reads /dev/tty?
>Could dump(8) be modified to abort at errors without any questions?

If you want dump to read the output from e.g. yes(1)
then you'll have to use a pty(4).

You should arrange that this pty is the control terminal of the
dump program and then write (redirect) the output of yes(1) to the pty.

Setting the control terminal of dump is done by writing a program which:

A) Removes the association with its control terminal by:

   ioctl(f, TIOCNOTTY, 0);

B) Opens the pty.

C) Exec's the dump program.

The above applies to Berkeley Unix 4.X