Finding a stream's filename

Nick Sayer nsayer at uop.EDU
Wed Jul 26 18:53:43 AEST 1989


I am in the midst of writing a new getty for a terribly ancient
machine, whose init passes getty only a single character, from which
it is to divine all the terminal data.

Trouble is, I want this getty to look at the uucp lock files to see
if uucp wants to use the phone. getty can't figure out the filename
of the lock file, because getty doesn't know what terminal it's
running on!

Can a process either 1) find the filename associated with an fopened
or opened file (and then then let me do it on stdout) or 2) find
out what device it's running on (less nice).

---------------------------------------------------------------------
Nick Sayer | ...{ apple!cheers | pacbell!cogent }!quack!mrapple
... or cheers!quack!mrapple at apple.COM
Packet radio: N6QQQ @ WB6V | FredMail: NSAYER at MADERA%NORCAL
Disclaimer: The BBC would like to appologise for that announcement
Note: Use this address. I don't have news running on quack, but mail works



More information about the Comp.unix.questions mailing list