Changeset 411 for trunk/include
- Timestamp:
- Aug 28, 2012, 9:00:20 PM (12 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/samhain.h
r405 r411 331 331 int looptime; /* timing for main loop */ 332 332 /*@null@*//*@out@*/ char * timezone; 333 334 #ifdef SCREW_IT_UP 335 int sigtrap_max_duration; 336 #endif 337 333 338 } sh_struct; 334 339 -
trunk/include/sh_unix.h
r410 r411 364 364 365 365 void sh_sigtrap_handler (int signum); 366 extern volatile int sh_not_traced;367 366 368 367 #ifdef HAVE_GETTIMEOFDAY … … 377 376 #endif 378 377 #endif 379 void sh_set_save_tv(); 380 void sh_set_untraced(int val); 381 int sh_get_untraced(); 382 #endif 378 #endif 379 380 struct sh_sigtrap_variables { 381 int not_traced; 382 #ifdef HAVE_GETTIMEOFDAY 383 struct timeval save_tv; 384 #endif 385 }; 386 387 struct sh_sigtrap_variables * sh_sigtrap_variables_get(); 388 389 int sh_sigtrap_max_duration_set (const char * str); 383 390 384 391 static inline … … 399 406 int sh_derr(void) 400 407 { 401 sh_set_untraced(0); 408 struct sh_sigtrap_variables * sigtrap_variables; 409 sigtrap_variables = sh_sigtrap_variables_get(); 410 if (sigtrap_variables == NULL) { 411 /* Perhaps, its better to not die, and to continue using Samhain, 412 even if this part does not work. */ 413 return (0); 414 } 415 416 sigtrap_variables->not_traced = 0; 402 417 403 418 #ifdef HAVE_GETTIMEOFDAY 404 sh_set_save_tv();419 gettimeofday(&sigtrap_variables->save_tv, NULL); 405 420 #endif 406 421 … … 409 424 raise(SIGTRAP); 410 425 411 if (s h_get_untraced()== 0)426 if (sigtrap_variables->not_traced == 0) 412 427 _exit(5); 413 428 414 s h_set_untraced(0);429 sigtrap_variables->not_traced = 0; 415 430 return (0); 416 431 }
Note:
See TracChangeset
for help on using the changeset viewer.