XPost: linux.debian.maint.glibc
From:
[email protected]
reassign 196251 glibc-doc
severity 196251 minor
retitle 196251 glibc-doc: info should describe about setpgrp() + _BSM_SOURCE. thanks
At Thu, 05 Jun 2003 19:16:23 +0200,
Robert Millan wrote:
The Glibc docs say:
- Function: int setpgrp (pid_t PID, pid_t PGID)
This is the BSD Unix name for `setpgid'. Both functions do exactly
the same thing.
but that isn't true, see the following test case:
$ cat test.c
#include <sys/types.h>
#include <unistd.h>
main ()
{
setpgid (0, 0);
setpgrp (0, 0);
}
$ gcc test.c -o /dev/null
test.c: In function `main':
test.c:6: error: too many arguments to function `setpgrp'
You need to compile -D_BSD_SOURCE if you want to use BSD's setpgrp.
In default, glibc uses SYSV style. But it's good idea to describe
about it. I'll update glibc-doc.
I've found this when i hit the kludges in Xfree86 sources to workaround it, in the style of:
#if defined(__linux__) || defined(__GNU__)
#define setpgrp setpgid
#endif
I think it's no problem. However if removing this definition causes compilation error, it may mean XFree86 needs large update for the
recent library specification. I expect freedesktop.org can answer
this kind of problem.
Regards,
-- gotom
--
To UNSUBSCRIBE, email to
[email protected]
with a subject of "unsubscribe". Trouble? Contact
[email protected]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)