Lines Matching refs:fh
93 int fh, waits = 0, rval = -1, pid, t, i;
145 fh = -1;
146 while (fh < 0) {
151 if ((fh = open(__opie_lockfilename, O_WRONLY | O_CREAT | O_EXCL, 0600)) < 0) {
158 if ((fh = open(__opie_lockfilename, O_RDONLY, 0600)) < 0)
160 if ((i = read(fh, buffer, sizeof(buffer))) <= 0)
188 close(fh);
189 fh = 0;
200 if (fstat(fh, &statbuf[1]) < 0)
209 if (lseek(fh, 0, SEEK_SET)) {
210 close(fh);
212 fh = 0;
215 if (write(fh, buffer, i) != i) {
216 close(fh);
218 fh = 0;
221 close(fh);
222 if ((fh = open(__opie_lockfilename, O_RDWR, 0600)) < 0) {
226 if (read(fh, buffer2, i) != i) {
227 close(fh);
229 fh = 0;
232 close(fh);
244 if (fh >= 0)
245 close(fh);