Changeset 317 for trunk/src/sh_calls.c
- Timestamp:
- Mar 15, 2011, 8:54:21 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_calls.c
r315 r317 242 242 } 243 243 244 static int sh_enable_use_sub = 0; 245 246 #if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE) 247 static int sh_use_sub = 1; 248 #else 244 249 static int sh_use_sub = 0; 250 #endif 251 252 void sh_calls_enable_sub() 253 { 254 sh_enable_use_sub = 1; 255 return; 256 } 245 257 246 258 int sh_calls_set_sub (const char * str) 247 259 { 248 return sh_util_flagval(str, &sh_use_sub); 260 int ret = sh_util_flagval(str, &sh_use_sub); 261 262 if ((ret == 0) && (!sh_use_sub)) 263 { 264 sh_kill_sub(); 265 } 266 return ret; 267 } 268 269 long int retry_lstat_ns(const char * file, int line, 270 const char *file_name, struct stat *buf) 271 { 272 int error; 273 long int val_retry = -1; 274 char errbuf[SH_ERRBUF_SIZE]; 275 276 SL_ENTER(_("retry_lstat_ns")); 277 278 do { 279 val_retry = /*@-unrecog@*/lstat (file_name, buf)/*@+unrecog@*/; 280 } while (val_retry < 0 && errno == EINTR); 281 282 error = errno; 283 if (val_retry < 0) { 284 (void) sh_error_message(error, aud_err_message, 64); 285 sh_error_handle ((-1), file, line, error, MSG_ERR_LSTAT, 286 sh_error_message(error, errbuf, sizeof(errbuf)), 287 file_name ); 288 } 289 errno = error; 290 291 SL_RETURN(val_retry, _("retry_lstat_ns")); 249 292 } 250 293 … … 258 301 SL_ENTER(_("retry_lstat")); 259 302 260 if (sh_use_sub )303 if (sh_use_sub && sh_enable_use_sub) 261 304 { 262 305 val_retry = sh_sub_lstat (file_name, buf); … … 290 333 SL_ENTER(_("retry_stat")); 291 334 292 if (sh_use_sub )335 if (sh_use_sub && sh_enable_use_sub) 293 336 { 294 337 val_retry = sh_sub_stat (file_name, buf);
Note:
See TracChangeset
for help on using the changeset viewer.