Am 27.10.22 um 14:17 schrieb Daniel P. Berrangé: > On Thu, Oct 27, 2022 at 12:14:43PM +0200, Fiona Ebner wrote: >> + warn_report("not removing PID file on exit: cannot resolve PID >> file" >> + " path: %s: %s", pid_file, strerror(errno)); >> + return; >> } > > I don't think using warn_report is desirable here. > > If the behaviour of passing a pre-unlinked pidfile is considered > valid, then we should allow it without printing a warning every > time an application does this. > > warnings are to highlight non-fatal mistakes by applications, and > this is not a mistake, it is intentionally supported behaviour. > > With regards, > Daniel
But what if the path resolution fails in a scenario where the caller did not pre-unlik the PID file? Should the warning only be printed when the errno is not ENOENT? Might still not be accurate in all cases though. Best Regards, Fiona