pgagroal
pgagroal copied to clipboard
Simplify code about pid file creation
While working on #298 and re-reading the documentation of open(2)
, I found that open(2)
fails when O_CREAT | O_EXCL
are specified as flags if the file is already there.
Therefore it is possible to remove the access(2)
check at https://github.com/agroal/pgagroal/blob/master/src/main.c#L1958 and catch specific errors to warn the user.