Re: How To Redirect STDERR to /dev/null programmatically
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Harsha Kodnad <harsha km tallysolutions com>
- Cc: GTK <gtk-app-devel-list gnome org>
- Subject: Re: How To Redirect STDERR to /dev/null programmatically
- Date: Fri, 27 Aug 2004 18:22:23 +0200
On Fri, Aug 27, 2004 at 08:03:34PM +0530, Harsha Kodnad wrote:
Anybody please tell me how to direct my application's STDERR to /dev/null programmatically. in a C
program.
freopen("/dev/null", "w", stderr);
I want to inhibit all warnings or errors generated by my application or shared libraries I am using by
doing this at my program initialization.
If we are talking about Gtk+, GLib, etc., you can also set
up a log handler for their messages with g_log_set_handler()
that doesn't actually print anything anywhere.
Yeti
--
Do not use tab characters. Their effect is not predictable.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]