On Apr 5, 2005, at 3:02 PM, Sam Steingold wrote:
>> * Lars Rosengreen <ynef@...> [2005-04-05 14:51:12 -0700]:
>> calls.c: In function `C_subr_posix_setpgrp':
>> calls.c:353: error: too few arguments to function `setpgrp'
> pid_t setpgrp(void);
> how is setpgrp() defined on your platform?
man setpgrp returns:
SETPGID(2) BSD System Calls Manual
setpgid, setpgrp - set process group
setpgid(pid_t pid, pid_t pgrp);
setpgrp(pid_t pid, pid_t pgrp);
Setpgid() sets the process group of the specified process pid to
specified pgrp. If pid is zero, then the call applies to the
If the invoker is not the super-user, then the affected process
the same effective user-id as the invoker or be a descendant of the
Setpgid() returns 0 when the operation was successful. If the
failed, -1 is returned and the global variable errno indicates the
Setpgid() will fail and the process group will not be altered if:
[EACCES] The value of the pid argument matches the
of a child process of the calling process, and
child process has successfully executed one of
[EPERM] The effective user ID of the requested process
ferent from that of the caller and the process
a descendant of the calling process.
[ESRCH] The value of the pid argument does not match
cess ID of the calling process or of a child
of the calling process.
The setpgid() function conforms to IEEE Std 1003.1-1988
Setpgrp() is identical to setpgid(), and is retained for calling
tion compatibility with historical versions of BSD.
4th Berkeley Distribution June 4, 1993 4th Berkeley
> please file a bug report about POSIX compliance with your vendor.
I will do that, but I'm not holding my breath. A search with google
suggests it has been this way since at least 2001.
> In the meantime, I suggest that you edit build/syscalls/config.h
> and replace "#define HAVE_SETPGRP 1" with "#undef HAVE_SETPGRP".
This works as a temporary solution. Thank you very much for your help.
> Sam Steingold (http://www.podval.org/~sds) running w2k
> <http://www.camera.org> <http://pmw.org.il/>
> <http://www.dhimmi.com/> <http://www.iris.org.il>
> nobody's life, liberty or property are safe while the legislature is
> in session
Lars Rosengreen <lars@...> http://www.margay.org/~lars