Changeset 252 for trunk/src/sh_unix.c
- Timestamp:
- Oct 12, 2009, 10:40:45 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_unix.c
r251 r252 1293 1293 fd++; 1294 1294 else 1295 close(fd++);1295 sl_close_fd(FIL__, __LINE__, fd++); 1296 1296 } 1297 1297 … … 1971 1971 /* Close first tree file descriptors 1972 1972 */ 1973 close (0); /* if running as daemon */1974 close (1); /* if running as daemon */1975 close (2); /* if running as daemon */1973 sl_close_fd (FIL__, __LINE__, 0); /* if running as daemon */ 1974 sl_close_fd (FIL__, __LINE__, 1); /* if running as daemon */ 1975 sl_close_fd (FIL__, __LINE__, 2); /* if running as daemon */ 1976 1976 1977 1977 /* Enable full error logging … … 2306 2306 _("time"), sh.srvtime.name); 2307 2307 } 2308 close(fd);2308 sl_close_fd(FIL__, __LINE__, fd); 2309 2309 } 2310 2310 else … … 2910 2910 2911 2911 r = ioctl (fd, EXT2_IOC_GETFLAGS, &f); 2912 /* close (fd); */2912 /* sl_close_fd (FIL__, __LINE__, fd); */ 2913 2913 2914 2914 if (r == -1) … … 3439 3439 int fstat_return; 3440 3440 int fstat_errno = 0; 3441 int try = 0; 3441 3442 3442 3443 sh_string * content = NULL; … … 3464 3465 stat_errno = errno; 3465 3466 3467 theFile->link_path = NULL; 3468 3469 try_again: 3470 3466 3471 fd = -1; 3467 3472 fstat_return = -1; 3468 3473 rval_open = -1; 3469 3474 3470 theFile->link_path = NULL;3471 3472 3475 if (stat_return == 0 && S_ISREG(buf.st_mode)) 3473 3476 { … … 3475 3478 path /* theFile->fullpath */, SL_YESPRIV); 3476 3479 if (SL_ISERROR(rval_open)) 3477 err_open = errno; 3478 3479 { 3480 char * stale = sl_check_stale(); 3481 3482 if (stale) 3483 { 3484 sh_error_handle(SH_ERR_ERR, FIL__, __LINE__, err_open, MSG_E_SUBGEN, 3485 stale, _("sh_unix_getinfo_open")); 3486 } 3487 } 3480 { 3481 char * stale = sl_check_stale(); 3482 3483 if (stale) 3484 { 3485 sh_error_handle(SH_ERR_ERR, FIL__, __LINE__, err_open, MSG_E_SUBGEN, 3486 stale, _("sh_unix_getinfo_open")); 3487 } 3488 3489 if (errno == EBADF && try == 0) /* obsolete, but we keep this, just in case */ 3490 { 3491 ++try; 3492 goto try_again; 3493 } 3494 err_open = errno; 3495 } 3488 3496 3489 3497 alert_timeout = 120; /* this is per 8K block now ! */ … … 3529 3537 MSG_E_SUBGEN, 3530 3538 stale, _("sh_unix_getinfo_fstat")); 3539 } 3540 3541 if (try == 0) /* obsolete, but we keep this, just in case */ 3542 { 3543 ++try; 3544 sl_close(rval_open); 3545 goto try_again; 3531 3546 } 3532 3547 }
Note:
See TracChangeset
for help on using the changeset viewer.