[LTP] [PATCH 07/13]Fix an wrong using of macro WTERMSIG

tangchen
2011-01-06T11:03:42Z

WRETMSIG need a argument.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
testcases/kernel/syscalls/pipe/pipe04.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/pipe/pipe04.c
b/testcases/kernel/syscalls/pipe/pipe04.c
index 20d87d4..f153f4a 100644
--- a/testcases/kernel/syscalls/pipe/pipe04.c
+++ b/testcases/kernel/syscalls/pipe/pipe04.c
@@ -80,7 +80,7 @@ int main(int ac, char **av)
int lc; /* loop counter */
char *msg; /* message returned from parse_opts */
pid_t c1pid, c2pid;
- int wtchild, wtstatus;
+ int wtstatus;
int bytesread;
int acnt = 0, bcnt = 0;

@@ -187,7 +187,8 @@ int main(int ac, char **av)
"writing to a pipe");
}
if (waitpid(c2pid, &wtstatus, 0) != -1) {
- if (!WIFSIGNALED(wtstatus) || WTERMSIG != SIGKILL)
+ if (!WIFSIGNALED(wtstatus) ||
+ WTERMSIG(wtstatus) != SIGKILL)
tst_resm(TFAIL|TERRNO, "unexpected wait status "
"%d", wtstatus);
else
@@ -249,4 +250,5 @@ void alarmfunc(int sig)
/* for some reason tst_brkm doesn't seem to work in a signal
handler */
tst_brkm(TFAIL, cleanup, "one or more children did't die in 60
second "
"time limit");
-}
\ No newline at end of file
+}
+
--
1.7.0.4

--
Best Regards,
Tang chen