⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (549 Bytes)
Bug #782
» main.cpp
Víctor López
, 04/08/2011 10:30 AM
#include
<ace/ACE.h>
#include
<Wt/WRandom>
#include
<string>
#include
<fstream>
#include
<iostream>
int
main
(
int
argc
,
char
*
argv
[])
{
ACE
::
daemonize
(
ACE_LIB_TEXT
(
"./"
),
ACE_DEFAULT_CLOSE_ALL_HANDLES
,
ACE_LIB_TEXT
(
argv
[
0
]));
try
{
unsigned
int
random
=
Wt
::
WRandom
::
get
();
std
::
ofstream
File
(
"Random.txt"
);
File
<<
random
;
}
catch
(
std
::
exception
&
e
)
{
std
::
ofstream
File
(
"Exception.txt"
);
//Writing to file because after daemonizing, std:err is not visible
File
<<
e
.
what
();
}
return
0
;
}
(1-1/1)
Loading...