Skip to content

Commit

Permalink
Add more information and problem resolution.
Browse files Browse the repository at this point in the history
The normal behavior of the pidfile is to prevent the daemon to be run twice.
When the ospd-openvas daemon dies unexpectedly or it is killed with SIGKILL (-9) signal,
leaves the pid file, which prevent the daemon to start again.
If this is the case, the pidfile must be removed manually.
  • Loading branch information
jjnicola committed Nov 12, 2020
1 parent 22e0093 commit 9f8fa63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ospd/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ def create_pid(pidfile: str) -> bool:
pidpath = Path(pidfile)

if pidpath.is_file():
LOGGER.error("There is an already running process.")
LOGGER.error(
"There is an already running process. If no process is running, "
"please remove the pid file '%s' manually",
str(pidpath.absolute()),
)
return False

try:
Expand Down

0 comments on commit 9f8fa63

Please sign in to comment.