Am 10.04.2014 03:35, schrieb Lennart Poettering:
>> Simply try:
>>   int func(...) {
>>      static bool network_namespace_warning = false;
>>      ...
>>
>>      if (!network_namespace_warning) {
>>          network_namespace_warning = true;
>>       log_warn("...");
>>      }
>>   }
>>
>> Zbyszek
> 
> Hmm, so actually this is more complex than this, since the network
> namespace stuff is done after we fork() before we exec() in the child
> process. That means having this as static variable won't help, since you
> could only set the copy, never the variable in the parent.

So, why not issue the warning while parsing the configuration, i.e.
during daemon startup or reload?


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to