- sprintf (buf, "%d\n", (int) pid);
- pidsize = strlen(buf);
- if ((tmp = write (fd, buf, pidsize)) != (int)pidsize)
- zlog_err("Could not write pid %d to pid_file %s, rc was %d: %s",
- (int)pid,path,tmp,safe_strerror(errno));
- else if (ftruncate(fd, pidsize) < 0)
- zlog_err("Could not truncate pid_file %s to %u bytes: %s",
- path,(u_int)pidsize,safe_strerror(errno));
- }
- return pid;
+ sprintf(buf, "%d\n", (int)pid);
+ pidsize = strlen(buf);
+ if ((tmp = write(fd, buf, pidsize)) != (int)pidsize)
+ zlog_err(
+ "Could not write pid %d to pid_file %s, rc was %d: %s",
+ (int)pid, path, tmp, safe_strerror(errno));
+ else if (ftruncate(fd, pidsize) < 0)
+ zlog_err(
+ "Could not truncate pid_file %s to %u bytes: %s",
+ path, (u_int)pidsize, safe_strerror(errno));
+ }
+ return pid;