----- Original Message -----
> From: "Xiaoguang Wang" <[email protected]>
> To: "Jan Stancek" <[email protected]>
> Cc: [email protected]
> Sent: Friday, 16 May, 2014 4:39:49 AM
> Subject: Re: [LTP] [PATCH 1/2] setpgid/setpgid01.c: cleanup
>
> >>
> > Hi,
> >
> >> + /*
> >> + * Make sure current process is NOT a session or pgrp leader
> >> + */
> >> if (pgid == pid) {
> > What if we dropped the condition above and always make a child?
> > If we do that, then setpgid_test1() and setpgid_test2() are almost the
> > same,
> > with the difference of arguments you pass to setpgid(), so there's a chance
> > to re-use some code.
> >
> > Thinking about it a bit more, is there any reason we need a child process?
>
> For pid = 0 & pgid = 0 test, I think we should have tests in child process,
> because in this case, according to setpgid()'s manpge, this will set
> child process's PGID to its PID, we should verify this.
"If pgid is zero, then the PGID of the process specified by pid is made the
same as its process ID."
I see. So, for "setpgid(0, 0);" it makes a difference and it
actually changes PGID to a different value. I'll have a look at v2
later today.
Regards,
Jan
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list