LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Displaying message on FC1 (https://www.linuxquestions.org/questions/linux-newbie-8/displaying-message-on-fc1-276232/)

roland_andrey 01-10-2005 04:07 PM

Displaying message on FC1
 
I am trying to write a system call which needs to print a message on terminal of every logged on user. printk writes to /var/log/messages, panic does the thing but locks the system. what should i use?

Thanks for the help

linuxgeekery 01-10-2005 04:34 PM

Actually, a simple way to do this is make a bash script with this:
#!/bin/bash
echo "message" > /dev/ttys_you_want
#be sure to list the ttys in a space seperated list eg. /dev/ttyx /dev/ttya...

roland_andrey 01-10-2005 05:05 PM

Sorry that was my foolness. I didnt make the thing clear. I am writing kernel code /usr/src/linux/kernel/user.c and that is where i wish to use the message thing. Does that still works?, cauz it generated an error.

Thanks again

MasterC 01-10-2005 06:50 PM

Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php


All times are GMT -5. The time now is 07:13 PM.