Add some debug hooks to check for memory leaks, etc.

This commit is contained in:
Michael Sweet 2017-03-29 19:10:59 -04:00
parent 6ac1fb23f4
commit 26a33621ca

View File

@ -708,8 +708,19 @@ main(int argc, /* I - Number of command-line args */
}
}
/*
* Debug hooks...
*/
if (getenv("TEST_DELAY") != NULL)
sleep(atoi(getenv("TEST_DELAY")));
if (getenv("TEST_LEAKS") != NULL)
{
char command[1024];
snprintf(command, sizeof(command), "leaks %d", (int)getpid());
system(command);
}
/*
* Return...