mirror of
https://github.com/curl/curl.git
synced 2026-08-01 20:40:28 +03:00
Test harness process control enhancements
This commit is contained in:
parent
3111701c38
commit
3802d027cd
4 changed files with 166 additions and 93 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue