New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

How is /dev/console managed?


Post Reply New Thread Subscribe

 
Thread Tools
rlhamil

 
Member Since: Apr 18, 2009
Posts: 1
rlhamil is on a distinguished road

rlhamil is offline
Before the GUI comes up, output to /dev/console
presumably is visible as text. Afterward, _something_
apparently captures the output. Perhaps the Console
app can show it too, although I must be missing it
somehow.

What I'd like to be able to do is intercept output to
/dev/console; not preventing it from going wherever
it goes now, but doing something with it, or at any
rate some of it; namely, filtering it a bit (maybe) and
popping up Growl notifications.

What brought this on is having a mixed environment
with both Solaris and Mac systems (well, one Mac)
at home. For example, Solaris NFS servers will
send a message using "rwall", which communicates
via rpc to rpc.rwalld (which in turn uses wall(1) to
write to all terminals). I ported rpc.rwalld from one
of the BSDs to Mac OS X with the only difficulty due to
the Mac's RPC APIs being different (and arguably lame).
But a Growl message for that sort of thing would be
the most friendly I thought about modifying rpc.rwalld,
but then thought it better to move it down deeper.
So I grabbed the Darwin source for wall(1), and thought
about putting the Growl notifications in there. But then
I thought, would it be _possible_ to solve this not only
for "wall" messages, but for anything else that gets
written to /dev/console too?

I saw the TIOCCONS ioctl in tty(4), but that seems to
suggest it only redirects kernel-originated messages,
and running xterm -C as root, and within it,
echo testing >/dev/console
does _not_ show the text written to /dev/console.

So I'm pretty much stumped as to how that's done.

Any hints? ("dump all those non-Mac systems" is _not_
acceptable :-)
QUOTE Thanks

Post Reply New Thread Subscribe


« dbg.gz | Mac OS X 10.5.6 and Java applets »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Managed to screw up my iTunes MikeandDeni OS X - Apps and Games 2 04-09-2009 09:28 AM
I've managed the 'unmanageable'! brianwmay Switcher Hangout 8 04-01-2008 05:22 PM
Managed Accounts Games don't work MacFanBoy OS X - Operating System 0 01-19-2008 11:58 PM
AutoStart in a Managed Account gadgetfreak Switcher Hangout 0 11-13-2006 08:34 AM

All times are GMT -4. The time now is 12:54 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?