Commit 7869e8ad authored by Danny Mayer's avatar Danny Mayer
Browse files

Braces were missing when isc__strerror was added

parent d67b8920
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: os.c,v 1.11 2001/11/21 05:07:23 mayer Exp $ */
/* $Id: os.c,v 1.12 2001/11/22 03:11:01 mayer Exp $ */
#include <config.h>
#include <stdarg.h>
......@@ -177,23 +177,26 @@ ns_os_writepidfile(const char *filename) {
return;
len = strlen(filename);
pidfile = malloc(len + 1);
if (pidfile == NULL)
if (pidfile == NULL) {
isc__strerror(errno, strbuf, sizeof(strbuf));
ns_main_earlyfatal("couldn't malloc '%s': %s",
filename, strbuf);
}
/* This is safe. */
strcpy(pidfile, filename);
fd = safe_open(filename, ISC_FALSE);
if (fd < 0)
if (fd < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
ns_main_earlyfatal("couldn't open pid file '%s': %s",
filename, strbuf);
}
lockfile = fdopen(fd, "w");
if (lockfile == NULL)
if (lockfile == NULL) {
isc__strerror(errno, strbuf, sizeof(strbuf));
ns_main_earlyfatal("could not fdopen() pid file '%s': %s",
filename, strbuf);
}
pid = getpid();
if (fprintf(lockfile, "%ld\n", (long)pid) < 0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment