Lines Matching defs:pidfile
69 int pidfile;
74 if( (pidfile = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0666)) < 0)
76 DPRINTF(E_ERROR, L_GENERAL, "Unable to open pidfile for writing %s: %s\n", fname, strerror(errno));
84 "Unable to write to pidfile %s: snprintf(): FAILED\n", fname);
85 close(pidfile);
90 if(write(pidfile, pidstring, pidstringlen) < 0)
91 DPRINTF(E_ERROR, L_GENERAL, "Unable to write to pidfile %s: %s\n", fname, strerror(errno));
94 close(pidfile);
103 int pidfile;
109 if( (pidfile = open(fname, O_RDONLY)) < 0)
114 if(read(pidfile, buffer, 63))
120 close(pidfile);
126 close(pidfile);