• Please review our updated Terms and Rules here

How can I interpose on /dev/console?

Elektraglide

Experienced Member
Joined
Mar 24, 2023
Messages
53
Location
UK
I would like to capture any writes to /dev/console and append it to a log file.

Tektronix Uniflex predates mkfifo()

I can simply link mylogfile /dev/console - but not sure what happens with multiple writers..

And it would be nice to timestamp the writes too so I was thinking if I create a AF_UNIX socket listener, is the filename in the filesystem it creates useable as a file? ie can I open and write to the file and it will appear as data to the AF_UNIX socket?

Or are there better ways to do this?
 
Back
Top