Mailing List Archive

setpgrp2()/getpgrp2() don't work in 5.001m
In 5.001m, setpgrp() doesn't work when it's implemented with setpgrp2(),
as perl tries to call it as setpgrp2(void). This is because setpgrp is
#defined to be setpgrp2 but USE_BSDPGRP isn't turned on, so perl still
thinks it's dealing with a setpgrp() which takes no args. The same
holds with getpgrp() implemented with getpgrp2(). Here's one possible
patch.

Index: perl.h
--- perl.h Tue Jun 20 10:09:03 1995
+++ ../perl/perl.h Thu Oct 5 17:21:19 1995
@@ -84,6 +84,19 @@
# endif
#endif

+#if defined(HAS_SETPGRP2) && defined(HAS_GETPGRP2)
+# ifndef USE_BSDPGRP
+# define USE_BSDPGRP
+# endif
+#else
+# if defined(HAS_SETPGRP2) || defined(HAS_GETPGRP2)
+ #error "You have one of setpgrp2() or getpgrp2(), but not both. \
+ This will cause perl's version of these to fail. pp_sys.c \
+ will need to be patched if this case actually needs to be \
+ handled."
+# endif
+#endif
+
#include <stdio.h>
#ifdef USE_NEXT_CTYPE
#include <appkit/NXCType.h>

--
Roderick Schertler
International Bonded Couriers/Miami
roderick@ibcinc.com
Re: setpgrp2()/getpgrp2() don't work in 5.001m [ In reply to ]
this prompted me to check for getpgid(). if you have getpgid() as
svr4 does, then, it's a replacement for the 4.3BSD getpgrp() which
does take a pid_t arg (unlike the POSIX one).

someone wanna whip up a patch?