Ah, thanks, now I understand. 

Could you then perhaps please add some comment like "As a deamon clamd always 
runs in the background forked by systemd, despite it's command line." in the 
config file? 

And do I understand correctly that e.g. clamav-milter won't have to wait on 
clamd loading the entire database?  I asked a similar question in the 
Clamav-users mailinglist, and met with different views on that. It made me look 
at the definition of Type= at 
https://www.freedesktop.org/software/systemd/man/systemd.service.html, 
intrigued and puzzled though. There I read "If ... default ... systemd will 
immediately proceed starting follow-up units." Is that what you mean? 

Met vriendelijke groet,
Paul Guijt 

-----Oorspronkelijk bericht-----
Van: 'Sebastian Andrzej Siewior' <sebast...@breakpoint.cc> 
Verzonden: zaterdag 14 april 2018 12:04
Aan: Paul Guijt <paul.gu...@xs4all.nl>
CC: pkg-clamav-de...@lists.alioth.debian.org
Onderwerp: Re: [Pkg-clamav-devel] --foreground in 
/lib/systemd/service/clamav-daemon.service deliberately?

On 2018-04-14 11:44:18 [+0200], Paul Guijt wrote:
> The problem is I asked a question, and I expected an answer. 
> 
> I see two possible options:
> 
> 1. Forking clamd is not good. Foreground as a command line and config file 
> option will be removed. 
> 
> 2. Forking clamd is ok, or no problem. The choice is to the user through the 
> command line or config file. The --foreground=true=  in the systemd service 
> will be removed. 
> 
> Doing nothing here seems bad coding to me. But I'm not a developer, so I just 
> asked. 

I'm sorry, I don't understand.
clamd is supposed to be a daemon which runs in the background. What we do is to 
let run clamd run foreground and let systemd fork it. So systemd can capture 
its output, monitor it and if needed restart.

If you don't want to run clamd in background then just don't start it and use 
clamscan instead. However it will need to load the whole database each time you 
invoke that binary for a scan so it might need some seconds before it actually 
does anything. You could use clamdscan instead but this would require that a 
daemon runs in the background (and does this costly init once).

I am not aware that the "--foreground=true=" option will be removed. If so, can 
you point me to the decoumentation saying so?

> Met vriendelijke groet,
> Paul Guijt

Sebastian


_______________________________________________
Pkg-clamav-devel mailing list
Pkg-clamav-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-clamav-devel

Reply via email to