All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] sigaction 9-1, 10-1, 11-1: use SIGKILL instead of SIGHUP
@ 2014-04-25  9:46 Stanislav Kholmanskikh
  2014-05-05 10:00 ` Stanislav Kholmanskikh
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislav Kholmanskikh @ 2014-04-25  9:46 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

There are test environments, where the SIGHUP signal may be either
added to the signal mask or ignored. One example of such environments
is Autotest, which sets the SIGHUP signal to SIG_IGN for its jobs.

Therefore the above test cases hang in that environment because their
parent processes send SIGHUP to terminate the child (and the child ignores it).

I think it will not be a problem to use SIGKILL here instead of SIGHUP, because
SIGKILL can not be caught, blocked, or ignored.
And it does the job - stopping the child - very well :)

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
 .../conformance/interfaces/sigaction/10-1.c        |    3 +--
 .../conformance/interfaces/sigaction/11-1.c        |    3 +--
 .../conformance/interfaces/sigaction/9-1.c         |    3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/10-1.c
index 1e729f4..e50357b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/10-1.c
@@ -101,8 +101,7 @@ int main(void)
 			wait_for_notification(CLD_CONTINUED);
 		}
 
-		/* POSIX specifies default action to be abnormal termination */
-		kill(pid, SIGHUP);
+		kill(pid, SIGKILL);
 		waitpid(pid, &s, 0);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/11-1.c
index 804bf9e..73405ea 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/11-1.c
@@ -95,8 +95,7 @@ int main(void)
 
 		}
 
-		/* POSIX specifies default action to be abnormal termination */
-		kill(pid, SIGHUP);
+		kill(pid, SIGKILL);
 		waitpid(pid, &s, 0);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/9-1.c
index 984a0ee..07dbb7b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/9-1.c
@@ -89,8 +89,7 @@ int main(void)
 			kill(pid, SIGCONT);
 		}
 
-		/* POSIX specifies default action to be abnormal termination */
-		kill(pid, SIGHUP);
+		kill(pid, SIGKILL);
 		waitpid(pid, &s, 0);
 	}
 
-- 
1.7.1


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] sigaction 9-1, 10-1, 11-1: use SIGKILL instead of SIGHUP
  2014-04-25  9:46 [LTP] [PATCH] sigaction 9-1, 10-1, 11-1: use SIGKILL instead of SIGHUP Stanislav Kholmanskikh
@ 2014-05-05 10:00 ` Stanislav Kholmanskikh
  2014-05-05 11:10   ` chrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislav Kholmanskikh @ 2014-05-05 10:00 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

Hi!

On 04/25/2014 01:46 PM, Stanislav Kholmanskikh wrote:
> There are test environments, where the SIGHUP signal may be either
> added to the signal mask or ignored. One example of such environments
> is Autotest, which sets the SIGHUP signal to SIG_IGN for its jobs.
>
> Therefore the above test cases hang in that environment because their
> parent processes send SIGHUP to terminate the child (and the child ignores it).
>
> I think it will not be a problem to use SIGKILL here instead of SIGHUP, because
> SIGKILL can not be caught, blocked, or ignored.
> And it does the job - stopping the child - very well :)
>
> Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>

Could anybody look at this patch, please?

Thanks.

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] sigaction 9-1, 10-1, 11-1: use SIGKILL instead of SIGHUP
  2014-05-05 10:00 ` Stanislav Kholmanskikh
@ 2014-05-05 11:10   ` chrubis
  0 siblings, 0 replies; 3+ messages in thread
From: chrubis @ 2014-05-05 11:10 UTC (permalink / raw)
  To: Stanislav Kholmanskikh; +Cc: vasily.isaenko, ltp-list

Hi!
> > There are test environments, where the SIGHUP signal may be either
> > added to the signal mask or ignored. One example of such environments
> > is Autotest, which sets the SIGHUP signal to SIG_IGN for its jobs.
> >
> > Therefore the above test cases hang in that environment because their
> > parent processes send SIGHUP to terminate the child (and the child ignores it).
> >
> > I think it will not be a problem to use SIGKILL here instead of SIGHUP, because
> > SIGKILL can not be caught, blocked, or ignored.
> > And it does the job - stopping the child - very well :)
> >
> > Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
> 
> Could anybody look at this patch, please?

Looks OK to me, acked.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-05 11:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25  9:46 [LTP] [PATCH] sigaction 9-1, 10-1, 11-1: use SIGKILL instead of SIGHUP Stanislav Kholmanskikh
2014-05-05 10:00 ` Stanislav Kholmanskikh
2014-05-05 11:10   ` chrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.