Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
34a0d59b
Commit
34a0d59b
authored
Sep 08, 2011
by
Tristan Matthews
Browse files
daemon: fixed prints in main
parent
378de489
Changes
1
Show whitespace changes
Inline
Side-by-side
daemon/src/main.cpp
View file @
34a0d59b
...
...
@@ -113,14 +113,14 @@ main (int argc, char **argv)
if
(
fp
)
{
// PID file exists. Check the former process still alive or not. If alive, give user a hint.
int
oldPid
;
if
(
fscanf
(
fp
,
"%d"
,
&
oldPid
)
!=
1
)
{
fprintf
(
stderr
,
"Couldn't read pidfile
%s
\n
"
,
pidfile
.
c_str
())
;
std
::
cerr
<<
"Couldn't read pidfile
"
<<
pidfile
<<
std
::
endl
;
return
1
;
}
fclose
(
fp
);
if
(
kill
(
oldPid
,
0
)
==
0
)
{
fprintf
(
stderr
,
"There is already a sflphoned daemon running in the system. Starting Failed."
)
;
std
::
cerr
<<
"There is already a sflphoned daemon running in the system. Starting Failed."
<<
std
::
endl
;
return
1
;
}
}
...
...
@@ -140,11 +140,11 @@ main (int argc, char **argv)
try
{
Manager
::
instance
().
init
();
}
catch
(
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
std
::
endl
;
return
1
;
}
catch
(...)
{
fprintf
(
stderr
,
"An exception occured when initializing the system."
)
;
std
::
cerr
<<
"An exception occured when initializing the system."
<<
std
::
endl
;
return
1
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment