mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
Make commandtest more robust wrt its execution environment
When executed from cron, commandtest would fail to correctly identify daemon processes. Set session ID and process group IDs at startup to ensure we have a consistent environment to run in. * tests/commandtest.c: Call setsid() and setpgid()
This commit is contained in:
parent
0905d1ee95
commit
f0e9dfeca9
@ -730,6 +730,9 @@ mymain(int argc, char **argv)
|
||||
if (chdir("/tmp") < 0)
|
||||
return(EXIT_FAILURE);
|
||||
|
||||
setpgid(0, 0);
|
||||
setsid();
|
||||
|
||||
/* Kill off any inherited fds that might interfere with our
|
||||
* testing. */
|
||||
fd = 3;
|
||||
|
Loading…
x
Reference in New Issue
Block a user