>
> > -----Ursprungliche Nachricht-----
> > Von: Peter Pentchev [mailto:[EMAIL PROTECTED]]
> > Gesendet: Freitag, 1. September 2000 14:00
> >
> > man 1 logger
> >
> > pipe your stdout/stderr to logger(1), and you're all set.
> > You may even
> > specify a facility/level to log with.
> >
>
> Thanks for your quick answer but I would prefer to
> do it entirely in C without calling external progs.
> I could think of a solution forking another child process
> which does the syslog logging and redirecting stdout/stderr
> of the execvped program via IPC to this child.
>
> But is there any easier solution?
You can use popen() to start the external process (logger in this
case) with the `IPC' already set up.
Then, perhaps an freopen() stdin/stdout... to the pipes would be
all you need.
popen() is one-way though...
- Dave R. -
--
[EMAIL PROTECTED] Work: (919) 676-0847
Get your mainframe (370) `C' compiler at http://www.dignus.com
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message