ATF-log archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: #53: atf-run hangs if child of test program gets stuck
- Subject: Re: #53: atf-run hangs if child of test program gets stuck
- From: "atf trac notification" <nobody%julipedia.org@localhost>
- Date: Sun, 01 Aug 2010 04:05:54 -0000
#53: atf-run hangs if child of test program gets stuck
----------------------+-----------------------------------------------------
Reporter: jmmv | Owner: jmmv
Type: defect | Status: new
Priority: major | Milestone: 0.11
Component: atf-run | Version:
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by Garrett Cooper <gcooper@...>):
Sorry, it should be like the following for completeness:
{{{
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <atf-c.h>
ATF_TC_BODY(forkexit, tc)
{
int status;
switch (fork()) {
case 0:
pause();
exit(0);
break;
case -1:
atf_tc_fail("fork");
break;
default:
if (wait(&status) == -1)
perror("wait");
break;
}
exit(status);
}
}}}
--
Ticket URL: <http://www.julipedia.org/projects/atf/trac/ticket/53#comment:4>
Automated Testing Framework <http://www.NetBSD.org/~jmmv/atf/>
Automated Testing Framework
Home |
Main Index |
Thread Index |
Old Index