On Monday 12 October 2009 14:28:02 Garrett Cooper wrote:
> On Mon, Oct 12, 2009 at 2:39 AM, liubo <[email protected]> wrote:
> > The test case ppoll01 does not register the signal handler
> > of SIGINT, so the program will be terminated by SIGINT
> > from child process.
> >
> > Then, the rest cases will not be tested.
> >
> > This patch fixed the problem.
> >
> > --- a/testcases/kernel/syscalls/ppoll/ppoll01.c
> > +++ b/testcases/kernel/syscalls/ppoll/ppoll01.c
> > @@ -124,9 +124,17 @@ extern void cleanup() {
> > +/*
> > + * sighandler()
> > + */
> > +void sighandler(int sig)
> > +{
> > +       return;
> > +}
> >  void setup() {
> >         /* Capture signals if any */
> > -        /* Create temporary directories */
> > +       signal(SIGINT, sighandler);
> > +       /* Create temporary directories */
> >         TEST_PAUSE;
> >         tst_tmpdir();
> >  }
> > @@ -404,16 +412,6 @@ TEST_END:
> >  }
> >
> >
> > -/*
> > - * sighandler()
> > - */
> > -void sighandler(int sig)
> > -{
> > -        if (sig == SIGINT)
> > -                return;
> > -        // NOTREACHED
> > -        return;
> > -}
> 
> 1. If all that the signal handler does is just return, it should have
> been doing SIG_IGN from the beginning.
> 2. I don't understand how your change fixes this because the signal
> handler's function is almost the same (the original handler was more
> generic).

default behavior with SIGINT is to terminate, and going by this patch, no one 
set up a signal handler for SIGINT.  so the fix as you implied sounds like:
        - call signal(SIGINT, SIG_IGN);
        - delete sighandlerr()
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to