How to set control tty (Sys5)

Chris Rende car at trux.UUCP
Fri Jul 6 03:56:50 AEST 1990


I need to run a program via CRON(1M). However, the program aborts (presumably)
because it cannot open it's control tty (/dev/tty). Running it in background
(with &) works, and so does "nohup fussy &".

I'd like to write a program which establishes a control tty and then spawns
the fussy program.

However, I can't figure/find out how to set the control tty. I read in
TERMIO(7) something like "The first terminal file that gets opened becomes
the control terminal". When I wrote a program that disassociates itself from
the control terminal and then does a "fd=open("/dev/ttyi00",O_RDWR);"
it didn't work. I.e, a "ps -ef" shows "?" for the control tty.

Any help would be appreciated.

Thanks,

car.
-- 
Christopher A. Rende           Central Cartage (Nixdorf/Pyramid/SysVR2/BSD4.3)
uunet!edsews!rphroy!trux!car   Multics,DTSS,Unix,Shortwave,Scanners,StarTrek
 trux!car at uunet.uu.net         Minix 1.2,PC/XT,Mac+,TRS-80 Model I,1802 ELF
       "I don't ever remember forgetting anything." - Chris Rende



More information about the Comp.unix.wizards mailing list