aboutsummaryrefslogtreecommitdiff
path: root/tests/server/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/server/util.c')
-rw-r--r--tests/server/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/server/util.c b/tests/server/util.c
index 7b00159ee..9db735d4c 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -86,7 +86,7 @@ void logmsg(const char *msg, ...)
vsnprintf(buffer, sizeof(buffer), msg, ap);
va_end(ap);
- logfp = fopen(serverlogfile, "a");
+ logfp = fopen(serverlogfile, "ab");
if(logfp) {
fprintf(logfp, "%s %s\n", timebuf, buffer);
fclose(logfp);
@@ -221,7 +221,7 @@ int write_pidfile(const char *filename)
long pid;
pid = (long)getpid();
- pidfile = fopen(filename, "w");
+ pidfile = fopen(filename, "wb");
if(!pidfile) {
logmsg("Couldn't write pid file: %s %s", filename, strerror(ERRNO));
return 0; /* fail */