[Pkg-clamav-devel] Bug#767353: Bug#767353: clamav: ERROR: Can't save PID to file /var/run/clamav/freshclam.pid: No such file or directory

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Thu Oct 30 21:14:46 UTC 2014


Hi Sebastian,

On 30.10.2014 21:55, Sebastian Andrzej Siewior wrote:
> I don't get it.

Then let me try to explain it in more detail. ;)

> Is systemd taking care of writing the PID file

No.

> or is it not used at all?

It's not used, because freshclam is run in foreground mode, i.e. it 
doesn't fork and thus tracking the PID via a file is not necessary.

> And why can't freshclam wite its PID file like it does
> with systemv?

It can only write the file if the directory exists.
The sysv init script creates the directory, but since it is not 
necessary for systemd, the service file does not create the directory.

The service file could also create this directory, however that's not 
straight forward in this case, because the PidFile path can be changed 
in the freshclam.conf file. Thus the service unit would have to parse 
that file and as it is not a simple shell snippet with 'Key=Value' 
entries, but rather contains 'Key Value' lines, one cannot directly use 
it as EnvironmentFile in the service unit.

As this warning is completely harmless, when systemd is used, I don't 
think it's worth to invest a lot of time trying to fix this.

But if someone finds a simple solution, it can be applied.

Best regards,
Andreas



More information about the Pkg-clamav-devel mailing list