]>
Commit | Line | Data |
---|---|---|
224c7076 A |
1 | --- killpg.c.orig 2005-01-26 12:24:56.000000000 -0800 |
2 | +++ killpg.c 2005-01-26 12:23:37.000000000 -0800 | |
3 | @@ -41,6 +41,16 @@ | |
4 | #include <signal.h> | |
5 | #include <errno.h> | |
6 | ||
7 | +int __kill(pid_t pid, int sig, int posix); | |
8 | + | |
9 | +#if __DARWIN_UNIX03 | |
10 | +#define _PID1ERR EPERM | |
11 | +#define _POSIXKILL 1 | |
12 | +#else /* !__DARWIN_UNIX03 */ | |
13 | +#define _PID1ERR ESRCH | |
14 | +#define _POSIXKILL 0 | |
15 | +#endif /* !__DARWIN_UNIX03 */ | |
16 | + | |
17 | /* | |
18 | * Backwards-compatible killpg(). | |
19 | */ | |
20 | @@ -48,8 +58,8 @@ | |
21 | killpg(pid_t pgid, int sig) | |
22 | { | |
23 | if (pgid == 1) { | |
24 | - errno = ESRCH; | |
25 | + errno = _PID1ERR; | |
26 | return (-1); | |
27 | } | |
28 | - return (kill(-pgid, sig)); | |
29 | + return (__kill(-pgid, sig, _POSIXKILL)); | |
30 | } |