mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-13 23:35:30 +00:00
Add some debug hooks to check for memory leaks, etc.
This commit is contained in:
parent
6ac1fb23f4
commit
26a33621ca
11
testmxml.c
11
testmxml.c
@ -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...
|
||||
|
Loading…
Reference in New Issue
Block a user