[LTP] [PATCH 2/2]sigpause/3-1.c Fix hung

DAN LI
2012-08-28T09:06:36Z

If sem is set as INTHREAD finally,the loop will be endless.

Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
---
.../open_posix_testsuite/conformance/interfaces/sigpause/3-1.c |
3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git
a/testcases/open_posix_testsuite/conformance/interfaces/sigpause/3-1.c
b/testcases/open_posix_testsuite/conformance/interfaces/sigpause/3-1.c
index 00024ed..6f1f454 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigpause/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigpause/3-1.c
@@ -30,7 +30,7 @@
#define INMAIN 1

int result = 2;
-int sem = INMAIN;
+int sem = INTHREAD;

void handler()
{
@@ -86,7 +86,6 @@ int main()
return PTS_UNRESOLVED;
}

- sem = INTHREAD;
while (sem == INTHREAD)
sleep(1);

--
1.7.10.2