Hi All,
the patch attached forces the catch_sighup to be volatile in order to
overcome an
issue due to the compiler optimization.
In fact, compiling the test with -Os the catch_sighup variable is not set to
1 into the signal handler.
So, at runtime, the test remain in a loop.
No problem compiling without Os or O2.

Regards,
Giuseppe
Force the catch_sighup to be volatile in order to overcome an 
issue due to the compiler optimization.
In fact, compiling the test with -Os the catch_sighup variable
is not set to 1 into the signal handler. At runtime, the 
test remain in a loop.
No problem compiling without Os or O2.

Signed-off-by: Giuseppe Cavallaro <[EMAIL PROTECTED]>
Signed-off-by: Carmelo Amoroso <[EMAIL PROTECTED]>

--- ltp/testcases/network/stress/ns-tools/ns-mcast_join.c.orig	2008-06-10 13:48:39.000000000 +0200
+++ ltp/testcases/network/stress/ns-tools/ns-mcast_join.c	2008-06-10 13:48:54.000000000 +0200
@@ -62,7 +62,7 @@
 char *program_name;		/* program name */
 
 struct sigaction handler;	/* Behavior for a signal */
-int catch_sighup;		/* When catch the SIGHUP, set to non-zero */
+volatile int catch_sighup;		/* When catch the SIGHUP, set to non-zero */
 
 sa_family_t family;		/* protocol family */
 int level;			/* protocol levels */
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to