reassigning /dev/tty

Peter Wichert wichert at quando.UUCP
Wed May 30 20:33:08 AEST 1990


Hi, 

I have a problem with re-connecting '/dev/tty' on a BSD System.

My program is a background-server that acts as a daemon.
Therefore I disconnected the server from all fd's , setpgrp'ed and
and throw away '/dev/tty' by 

fd = open ("/dev/tty", O_RDWR);
ioctl (fd, TIOCNOTTY, 0)'.
close (fd);

But the program has to do something with '/etc/restore' later,
and '/etc/restore' wants to open '/dev/tty'.
The error 'no such device or address' comes up.
This comes up although I reconnected with a new controlling terminal.

How can I reconnect '/dev/tty' to my program again ????
Any Ideas ??

Bye, Peter
-- 
 Peter Wichert  UUCP:     {backbone}!unido!quando!wichert OR wichert at quando.uucp
  Quantum GmbH  Bitnet:   UNIDO!quando!wichert OR wichert%quando at UNIDO(.bitnet)
    Dortmund    internet: wichert%quando%unido.UUCP at mcsun.cwi.nl
    Germany     internet: wichert at quando.quantum.de



More information about the Comp.unix.wizards mailing list