PATCH: Double pid file truncation in NSD 4.0.0b2

Hi.

I wrote little patch (as attachment) for NSD 4.0.0b2 which changed
server.c and nsd.c.
I found that
unlinkpid(const char* file) in nsd.c do same like code in server_main
(server.c).
But code in server_main don't check if filename is not blank.

Best regards
Robin Hack

(attachments)

nsd-4.0.0b2-double-truncation.patch (1.07 KB)

Hi Robin,