documentation improvements, gcc 4.3 warning fix

This commit is contained in:
Guenter Obiltschnig 2009-04-02 13:01:07 +00:00
Родитель 019572be51
Коммит 614c87b4be
2 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -1,7 +1,7 @@
//
// HelpFormatter.h
//
// $Id: //poco/svn/Util/include/Poco/Util/HelpFormatter.h#1 $
// $Id: //poco/Main/Util/include/Poco/Util/HelpFormatter.h#3 $
//
// Library: Util
// Package: Options
@ -116,6 +116,9 @@ public:
/// Enables Unix-style options. Both short and long option names
/// are printed if Unix-style is set. Otherwise, only long option
/// names are printed.
///
/// After calling setUnixStyle(), setAutoIndent() should be called
/// as well to ensure proper help text formatting.
bool isUnixStyle() const;
/// Returns if Unix-style options are set.

Просмотреть файл

@ -1,7 +1,7 @@
//
// ServerApplication.cpp
//
// $Id: //poco/Main/Util/src/ServerApplication.cpp#27 $
// $Id: //poco/Main/Util/src/ServerApplication.cpp#28 $
//
// Library: Util
// Package: Application
@ -472,9 +472,12 @@ void ServerApplication::beDaemon()
// instead of just closing them. This avoids
// issues with third party/legacy code writing
// stuff to stdout/stderr.
freopen("/dev/null", "r+", stdin);
freopen("/dev/null", "r+", stdout);
freopen("/dev/null", "r+", stderr);
FILE* fin = freopen("/dev/null", "r+", stdin);
if (!fin) throw Poco::OpenFileException("Cannot attach stdin to /dev/null");
FILE* fout = freopen("/dev/null", "r+", stdout);
if (!fout) throw Poco::OpenFileException("Cannot attach stdout to /dev/null");
FILE* ferr = freopen("/dev/null", "r+", stderr);
if (!ferr) throw Poco::OpenFileException("Cannot attach stderr to /dev/null");
}