* [Buildroot] how does udhcpc print messages to console
@ 2012-11-06 19:48 Jürgen Benjamin Ronshausen
0 siblings, 0 replies; 2+ messages in thread
From: Jürgen Benjamin Ronshausen @ 2012-11-06 19:48 UTC (permalink / raw)
To: buildroot
hi,
i am trying to print message from my program which is called in a shell
script.
problem is the shell script collects all the output from my program and
doesn't print it immediately.
i noticed, that udhcpc print its messages immediately by calling syslog.
from debug.h
# define LOG_EMERG "EMERGENCY!"
# define LOG_ALERT "ALERT!"
# define LOG_CRIT "critical!"
# define LOG_WARNING "warning"
# define LOG_ERR "error"
# define LOG_INFO "info"
# define LOG_DEBUG "debug"
# define LOG(level, str, args...) do { printf("%s, ", level); \
printf(str, ## args); \
printf("\n"); } while(0)
# define OPEN_LOG(name) do {;} while(0)
#define CLOSE_LOG() do {;} while(0)
from dhcpc.c
OPEN_LOG("udhcpc");
LOG(LOG_INFO, "udhcp client (v%s) started", VERSION);
is there more than this to do?
thx J?rgen
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Buildroot] how does udhcpc print messages to console
@ 2012-11-07 13:54 Jürgen Benjamin Ronshausen
0 siblings, 0 replies; 2+ messages in thread
From: Jürgen Benjamin Ronshausen @ 2012-11-07 13:54 UTC (permalink / raw)
To: buildroot
solution found
fflush(stdout);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-07 13:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 19:48 [Buildroot] how does udhcpc print messages to console Jürgen Benjamin Ronshausen
-- strict thread matches above, loose matches on Subject: below --
2012-11-07 13:54 Jürgen Benjamin Ronshausen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox