diff options
Diffstat (limited to 'openbsd-compat/bsd-misc.c')
-rw-r--r-- | openbsd-compat/bsd-misc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index cdc63c24d..64de6945c 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | #include "xmalloc.h" | 26 | #include "xmalloc.h" |
27 | 27 | ||
28 | RCSID("$Id: bsd-misc.c,v 1.13 2003/05/18 14:13:39 djm Exp $"); | 28 | RCSID("$Id: bsd-misc.c,v 1.14 2003/08/02 13:31:42 dtucker Exp $"); |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * NB. duplicate __progname in case it is an alias for argv[0] | 31 | * NB. duplicate __progname in case it is an alias for argv[0] |
@@ -167,3 +167,16 @@ int nanosleep(const struct timespec *req, struct timespec *rem) | |||
167 | 167 | ||
168 | #endif | 168 | #endif |
169 | 169 | ||
170 | #ifndef HAVE_TCGETPGRP | ||
171 | pid_t | ||
172 | tcgetpgrp(int fd) | ||
173 | { | ||
174 | int result, ctty_pgrp; | ||
175 | |||
176 | if (ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) == -1) | ||
177 | return(-1); | ||
178 | else | ||
179 | return(ctty_pgrp); | ||
180 | } | ||
181 | #endif /* HAVE_TCGETPGRP */ | ||
182 | |||