linux - ncurses disable kernel messages on console screen? -


im looking way how rid of (kernel?) messages appear in ncurses app. wrote app myself, prefer api redirects these messages /dev/null. mean messages like, usb stick inserted.

i tried add this, unfortunately doesn't work

freopen("/dev/null", "w", stderr); 

i'm not running x, ncurses direct console.

i mean messages like, usb stick inserted.

thanks!

update 1: someone votes close question because not related programming. is, wrote ncurses app myself, i'm looking way how disable kernel message. updated question.

update 2: let me explain i'm doing, , whats problem in more detail:

i'm using tiny core linux, thats after boots starts (self written) ncurses program. when example connect usb drive, message (i suspect kernel) shown on program. guess message written straight framebuffer. im using tc 5.x since need 32 bit, im running root , have full access os.

you should able use openvt have program run on new virtual terminal.

i'll note should possible embed control vts if prefer break external dependency, note structures used may not stable between kernel versions, , may require recompilation. see kbd project's sources, openvt.c see how works.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -