mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 10:21:20 +00:00
With --trace-children=yes, none/test/execve exec ve forever. This avoids an infinite loop when running outer on inner regression tests (for which --trace-children=yes is mandatory for the outer). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12440
20 lines
373 B
C
20 lines
373 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
if (argc == 1)
|
|
{
|
|
// This tests the case where argv and envp are NULL, which is easy to
|
|
// get wrong because it's an unusual case.
|
|
if (execve("/bin/true", NULL, NULL) < 0)
|
|
{
|
|
perror("execve");
|
|
exit(1);
|
|
}
|
|
}
|
|
|
|
exit(0);
|
|
}
|