getpgrp/getpgrp2 in perl5 under HP-UX 
Author Message
 getpgrp/getpgrp2 in perl5 under HP-UX

I'm at my wit's end trying to use getpgrp successfully under
HP-UX 9.05 with perl5.001 (I'm at patchlevel e).

Actually, I'm not quite at my wit's end... I think I'm coming
close to a solution... but here's the problem:

Originally, if I called the function with no arguments, it would
always return -1, instead of the current process group id.  Furthermore,
If I called it with one argument, it was responding with

        "POSIX getpgrp can't take an argument"

In one sense, this is true, but HP-UX has getpgrp2, which takes
a single argument (to let you pass the process id of another
process).  In fact, my config.h has HAS_GETPGRP2 defined.

I think the culprit is the USE_BSDPGRP #define.  I manually enabled
it and recompiled.  Now, the function works just fine when I call
it with no arguments.  Furthermore, it doesn't complain with an
error message when I pass an argument ; however, it does return
-1, which, obviously, isn't the right answer.

Has anybody else seen this behavior?  Am I way off base?  Any
solutions?

Thanks in advance!

-Jason Topaz
--
----------------------------------------------------------------------------
Jason Topaz          BEABLE BEABLE BEABLE BEABLE BEABLE BEABLE BEABLE BEABLE

----------------------------------------------------------------------------



Mon, 05 Jan 1998 03:00:00 GMT  
 getpgrp/getpgrp2 in perl5 under HP-UX

: I think the culprit is the USE_BSDPGRP #define.  I manually enabled
: it and recompiled.  Now, the function works just fine when I call
: it with no arguments.  Furthermore, it doesn't complain with an
: error message when I pass an argument ; however, it does return
: -1, which, obviously, isn't the right answer.

: Has anybody else seen this behavior?  Am I way off base?  Any
: solutions?

I've tried what you suggested, but I do get an okay return value when
I use $$ as the argument; however, as you say, when I use any other PID,
it returns -1.

My POSIX manual defines getpgrp(void), but the Camel book says getpgrp
takes an arbitrary PID.  This should probably be resolved at the Larry level.

Jeff Okamoto



Fri, 09 Jan 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Compile perl5 on HP 7xx/HP-UX 8.0 ?

2. NDBM problems with Perl5 on HP-UX

3. open2 fails with perl5 on HP-UX??

4. Problem Building Perl5 on HP-UX

5. Perl5 SNMP-1.7 on HP-UX

6. Perl5 build fails for HP-UX 8

7. Perl5.001 on a K400 running HP-UX 10.00

8. Perl5.001 on K400 running HP-UX 10.00

9. ** Help compiling Perl5 on HP-UX **

10. HELP: Problem building perl5 on HP-UX 9.03

11. problem compiling perl5.001 on HP-UX

12. HP-UX problem compiling perl5.001

 

 
Powered by phpBB® Forum Software