You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Improve fork harness to allow multiple children and setup pipes automatically.
There was a lot of extra boilerplate involved in setting up pipes so that is now automated. In some cases testing with multiple children is useful so allow that as well.
This commit is contained in:
@ -29,13 +29,12 @@ testRun(void)
|
||||
{
|
||||
HARNESS_FORK_BEGIN()
|
||||
{
|
||||
HARNESS_FORK_CHILD()
|
||||
HARNESS_FORK_CHILD_BEGIN(errorTypeCode(&TermError), false)
|
||||
{
|
||||
exitInit();
|
||||
raise(SIGTERM);
|
||||
}
|
||||
|
||||
HARNESS_FORK_CHILD_EXPECTED_EXIT_STATUS_SET(errorTypeCode(&TermError));
|
||||
HARNESS_FORK_CHILD_END();
|
||||
}
|
||||
HARNESS_FORK_END();
|
||||
}
|
||||
|
Reference in New Issue
Block a user