1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
/*
ionstop.c: Helper code to stop ION from C.
*/
#include <bp.h>
#include "check.h"
void ionstop()
{
int pid;
int status;
pid = pseudoshell("bpadmin .");
fail_unless(pid != ERROR);
fail_unless(-1 != waitpid(pid, &status, 0),
"Failed to wait for bpadmin to stop.");
pid = pseudoshell("ltpadmin .");
fail_unless(pid != ERROR);
fail_unless(-1 != waitpid(pid, &status, 0),
"Failed to wait for ltpadmin to stop.");
pid = pseudoshell("ionadmin .");
fail_unless(pid != ERROR);
fail_unless(-1 != waitpid(pid, &status, 0),
"Failed to wait for ionadmin to stop.");
#if ! defined (VXWORKS) && ! defined (RTEMS)
pid = pseudoshell("killm");
fail_unless(pid != ERROR);
fail_unless(-1 != waitpid(pid, &status, 0),
"Failed to wait for killm to finish");
#endif
}
|