All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] tools/t0: Use version of setpgrp that takes no arguments.
@ 2012-07-11  7:09 Vinson Lee
  2012-07-11 14:28 ` chrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Vinson Lee @ 2012-07-11  7:09 UTC (permalink / raw)
  To: ltp-list

IEEE Std 1003.1, 2004 Edition and IEEE Std 1003.1-2008 only have the
version of setpgrp that takes no arguments.

http://pubs.opengroup.org/onlinepubs/009695299/functions/setpgrp.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/setpgrp.html

Also fixes build error on Mac OS X 10.7.

Signed-off-by: Vinson Lee <vlee@twitter.com>
---
 testcases/open_posix_testsuite/tools/t0.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/testcases/open_posix_testsuite/tools/t0.c b/testcases/open_posix_testsuite/tools/t0.c
index d8ac328..96bae9f 100644
--- a/testcases/open_posix_testsuite/tools/t0.c
+++ b/testcases/open_posix_testsuite/tools/t0.c
@@ -101,7 +101,7 @@ int main (int argc, char * argv[])
 		perror("fork failed");
 		exit(1);
 	case 0:
-		setpgrp(0, 0);
+		setpgrp();
 		execvp(argv[2], &argv[2]);
 		perror("execvp failed");
 		exit(1);
-- 
1.7.7.5 (Apple Git-26)


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] tools/t0: Use version of setpgrp that takes no arguments.
  2012-07-11  7:09 [LTP] [PATCH] tools/t0: Use version of setpgrp that takes no arguments Vinson Lee
@ 2012-07-11 14:28 ` chrubis
  0 siblings, 0 replies; 2+ messages in thread
From: chrubis @ 2012-07-11 14:28 UTC (permalink / raw)
  To: Vinson Lee; +Cc: ltp-list

Hi!
> IEEE Std 1003.1, 2004 Edition and IEEE Std 1003.1-2008 only have the
> version of setpgrp that takes no arguments.
> 
> http://pubs.opengroup.org/onlinepubs/009695299/functions/setpgrp.html
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/setpgrp.html
> 
> Also fixes build error on Mac OS X 10.7.
> 
> Signed-off-by: Vinson Lee <vlee@twitter.com>
> ---
>  testcases/open_posix_testsuite/tools/t0.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/testcases/open_posix_testsuite/tools/t0.c b/testcases/open_posix_testsuite/tools/t0.c
> index d8ac328..96bae9f 100644
> --- a/testcases/open_posix_testsuite/tools/t0.c
> +++ b/testcases/open_posix_testsuite/tools/t0.c
> @@ -101,7 +101,7 @@ int main (int argc, char * argv[])
>  		perror("fork failed");
>  		exit(1);
>  	case 0:
> -		setpgrp(0, 0);
> +		setpgrp();
>  		execvp(argv[2], &argv[2]);
>  		perror("execvp failed");
>  		exit(1);

Hmm, that is not enough to make it work in Linux, appereantly glibc
doesn't expose any of the setpgrp() definitions unless you specify which
one you want. And it's market as obsolete even in POSIX what about
replacing it with with more up to date interface?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2012-07-11 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11  7:09 [LTP] [PATCH] tools/t0: Use version of setpgrp that takes no arguments Vinson Lee
2012-07-11 14:28 ` 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.