mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 09:41:21 +00:00
For coverage testing use exit() instead of _exit() when termiating saving children.
This commit is contained in:
12
src/redis.c
12
src/redis.c
@ -356,6 +356,18 @@ long long mstime(void) {
|
||||
return ustime()/1000;
|
||||
}
|
||||
|
||||
/* After an RDB dump or AOF rewrite we exit from children using _exit() instead of
|
||||
* exit(), because the latter may interact with the same file objects used by
|
||||
* the parent process. However if we are testing the coverage normal exit() is
|
||||
* used in order to obtain the right coverage information. */
|
||||
void exitFromChild(int retcode) {
|
||||
#ifdef COVERAGE_TEST
|
||||
exit(retcode);
|
||||
#else
|
||||
_exit(retcode);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*====================== Hash table type implementation ==================== */
|
||||
|
||||
/* This is an hash table type that uses the SDS dynamic strings libary as
|
||||
|
Reference in New Issue
Block a user