[comp.unix.questions] Pty's and cpio

sarima@gryphon.COM (Stan Friesen) (03/01/89)

	Hello again. Tanks to all of you who responded to my question
about pseudo-ttys.  It was quite helpful.  I will try to find some time to
assemble a summary of the responses to post, since I got several requests
for that.

	Now, on to my real current problem.  I am trying to attach cpio
as a background/slave process while retaining the ability to process
multiple tapes.  The problem: the moment it tries to *read* the response
from the master program telling it that the tape has been switched, it dumps
core!  At first I assumed that this was because it opened /dev/tty to read
the response.  That is why I wanted pseudo-ttys, so I could make the slave
end of one the control terminal for the cpio.  Well, all my test programs
worked perfectly, the pseudo-ttys were opened and attached as control terminal,
my test master properly did I/O on them and the slave's open() of /dev/tty
went to the pseudo-tty as I wished.  So I assumed everything was peachy and
installed the whole mess in my actual application.  Result: no change in the
behavior of cpio, it still dumps core on the read of /dev/tty!!  I have
verified, from another terminal, that the control terminal for the cpio is
in fact the slave end to the pseudo-tty, so I *assume* it must be proeprly
attached.

	Could anyone help me? Why is the cpio dieing?? What can I do to
get it to properly read the response from the master?
-- 
Sarima Cardolandion			sarima@gryphon.CTS.COM
aka Stanley Friesen			rutgers!marque!gryphon!sarima
					Sherman Oaks, CA

gregg@ihlpb.ATT.COM (Wonderly) (03/02/89)

From article <12715@gryphon.COM>, by sarima@gryphon.COM (Stan Friesen):
> 
> 	Could anyone help me? Why is the cpio dieing?? What can I do to
> get it to properly read the response from the master?

Is it possible for you to run sdb on the core image and look at what is
happening?  Use a 't' and 'x' command to get all the gorry details...

-- 
Gregg Wonderly                             DOMAIN: gregg@ihlpb.att.com
AT&T Bell Laboratories                     UUCP:   att!ihlpb!gregg