pgagroal icon indicating copy to clipboard operation
pgagroal copied to clipboard

Simplify code about pid file creation

Open fluca1978 opened this issue 2 years ago • 0 comments

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.

fluca1978 avatar Aug 11 '22 09:08 fluca1978