]> andersk Git - openssh.git/commitdiff
- (dtucker) [openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
authordtucker <dtucker>
Sat, 2 Aug 2003 13:31:42 +0000 (13:31 +0000)
committerdtucker <dtucker>
Sat, 2 Aug 2003 13:31:42 +0000 (13:31 +0000)
  Add a tcgetpgrp function.

ChangeLog
openbsd-compat/bsd-misc.c
openbsd-compat/bsd-misc.h

index e0c56e8c157c817955fdc324cec02983afacc582..760152342406094a6c91d1f94b03f904f9517f7e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,8 @@
      replace 4 clause BSD licensed progressmeter code with a replacement
      from Nils Nordman and myself; ok deraadt@
      (copied from OpenBSD an re-applied portable changes)
+ - (dtucker) [openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
+   Add a tcgetpgrp function.
 
 20030730
  - (djm) [auth-pam.c] Don't use crappy APIs like sprintf. Thanks bal
index 6b254117f60c030b176ca2c7a475b49ee319bccd..4bbef5e2cdd27c9c70e820a09c84a9e859df95c7 100644 (file)
@@ -167,3 +167,16 @@ int nanosleep(const struct timespec *req, struct timespec *rem)
 
 #endif
 
+#ifndef HAVE_TCGETPGRP
+pid_t
+tcgetpgrp(int fd)
+{
+       int result, ctty_pgrp;
+
+       if (ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) == -1)
+               return(-1);
+       else
+               return(ctty_pgrp);
+}
+#endif /* HAVE_TCGETPGRP */
+
index dd88d56de5a8c60c9b2a710b5e8d01b21efd8ce7..2f94c615a531e00175ee40819c44ebcaf207df6a 100644 (file)
@@ -89,4 +89,8 @@ struct timespec {
 int nanosleep(const struct timespec *, struct timespec *);
 #endif
 
+#ifndef HAVE_TCGETPGRP
+pid_t tcgetpgrp(int);
+#endif /* HAVE_TCGETPGRP */
+
 #endif /* _BSD_MISC_H */
This page took 0.15577 seconds and 5 git commands to generate.