git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1093
91ce42f0-d328-0410-95d8-
f526ca767f89
unlink(mp_chr(fname)); /* remove stale pid file */
}
/* Create new pid file */
- if ((pidfd = open(mp_chr(fname), O_CREAT|[CTRUNC|O_WRONLY|O_BINARY, 0644)) >= 0) {
+ if ((pidfd = open(mp_chr(fname), O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0644)) >= 0) {
len = sprintf(pidbuf, "%d\n", (int)getpid());
write(pidfd, pidbuf, len);
close(pidfd);