public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Serge Hallyn <serue@linux.vnet.ibm.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] Synchronization between two processes
Date: Fri, 15 May 2009 14:11:27 +0530	[thread overview]
Message-ID: <1242376887.7224.30.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <4A0D13F2.8030804@cn.fujitsu.com>

On Fri, 2009-05-15 at 15:04 +0800, Gui Xiaohua wrote:
> The child-process wait SIGUSR1 which would be sended by parent-process,
> if the child-process execute sigtimedwait() after parent-process send 
> the signal, it would never receive the SIGUSR1 from parent-process.
> I cann't make sure the SIGUSR1 be sended after child-process execute 
> sigtimedwait() with 100 percent, and i try my best.
> 
> Signed-off-by: Gui Xiaohua <guixh@cn.fujitsu.com>

Over to Serge.

Regards--
Subrata

> --- testcases/kernel/containers/pidns/pidns12-old.c	2009-05-14 17:00:20.000000000 +0800
> +++ testcases/kernel/containers/pidns/pidns12.c	2009-05-15 15:15:22.000000000 +0800
> @@ -109,7 +109,7 @@ int child_fn(void *arg)
>  	}
> 
>  	/* Set timeout for sigtimedwait */
> -	timeout.tv_sec = 3;
> +	timeout.tv_sec = 10;
>  	timeout.tv_nsec = 0;
> 
>  	/* Set mask to wait for SIGUSR1 signal */
> @@ -182,6 +182,9 @@ int main(int argc, char *argv[])
>  		cleanup();
>  	}
> 
> +	/*Try best to make sure the SIGUSR1 be sended after child-process execute sigtimedwait*/
> +	sleep(5);
> +
>  	/* Send SIGUSR1 to container init */
>  	if (kill(cpid, SIGUSR1) == -1) {
>  		tst_resm(TBROK, "parent: kill() failed(%s).", strerror(errno));
> 
> 
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables 
> unlimited royalty-free distribution of the report engine 
> for externally facing server and web deployment. 
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2009-05-15  8:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15  7:04 [LTP] [PATCH] Synchronization between two processes Gui Xiaohua
2009-05-15  8:41 ` Subrata Modak [this message]
2009-05-15 13:45 ` Serge E. Hallyn
2009-05-18 11:59   ` Subrata Modak
2009-05-18 15:07     ` Serge E. Hallyn
2009-05-22  5:55       ` Wei Yongjun
2009-05-25 16:13         ` Subrata Modak
2009-05-25 22:17           ` Serge E. Hallyn
2009-05-26 12:22             ` Subrata Modak
2009-05-25 22:16         ` Serge E. Hallyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1242376887.7224.30.camel@subratamodak.linux.ibm.com \
    --to=subrata@linux.vnet.ibm.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=serue@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox