Closed fasmide closed 5 years ago
I hadn't considered this case, thanks for the PR!
Ah, and if you have time for a small test, I would also appreciate that!
Ah, and if you have time for a small test, I would also appreciate that!
Sure - I've added a test case for writing pidfiles without paths e.g. by specifying just tableflip-testpid.pid
and while this does increase the coverage - it does not really test the issue at hand where the temp file is written on another mount point... Properly good enough :)
Hi fasmide,
I made the changes myself, and merged #28. I hope you don't mind.
Thanks for contributing!
Hello
When specifying just a filename e.g.
app.pid
as PIDFile option (expecting it to appear in the current working directory) - the previous code created a tmp file in/tmp
and then tried toos.Rename
it back to the current work directory - This results ininvalid cross-device link
errors fromos.Rename
if/tmp
is on another mount pointThis is a proposal to fix the issue, by using the current work directory for the tmp file if no path was given :)