- (dtucker) [openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
Add a tcgetpgrp function.
This commit is contained in:
parent
06ef75bf0c
commit
2e9c9cf702
|
@ -23,6 +23,8 @@
|
||||||
replace 4 clause BSD licensed progressmeter code with a replacement
|
replace 4 clause BSD licensed progressmeter code with a replacement
|
||||||
from Nils Nordman and myself; ok deraadt@
|
from Nils Nordman and myself; ok deraadt@
|
||||||
(copied from OpenBSD an re-applied portable changes)
|
(copied from OpenBSD an re-applied portable changes)
|
||||||
|
- (dtucker) [openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
|
||||||
|
Add a tcgetpgrp function.
|
||||||
|
|
||||||
20030730
|
20030730
|
||||||
- (djm) [auth-pam.c] Don't use crappy APIs like sprintf. Thanks bal
|
- (djm) [auth-pam.c] Don't use crappy APIs like sprintf. Thanks bal
|
||||||
|
@ -761,4 +763,4 @@
|
||||||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2872 2003/08/02 13:28:38 dtucker Exp $
|
$Id: ChangeLog,v 1.2873 2003/08/02 13:31:42 dtucker Exp $
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
RCSID("$Id: bsd-misc.c,v 1.13 2003/05/18 14:13:39 djm Exp $");
|
RCSID("$Id: bsd-misc.c,v 1.14 2003/08/02 13:31:42 dtucker Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NB. duplicate __progname in case it is an alias for argv[0]
|
* 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)
|
||||||
|
|
||||||
#endif
|
#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 */
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: bsd-misc.h,v 1.8 2003/05/18 14:13:39 djm Exp $ */
|
/* $Id: bsd-misc.h,v 1.9 2003/08/02 13:31:42 dtucker Exp $ */
|
||||||
|
|
||||||
#ifndef _BSD_MISC_H
|
#ifndef _BSD_MISC_H
|
||||||
#define _BSD_MISC_H
|
#define _BSD_MISC_H
|
||||||
|
@ -89,4 +89,8 @@ struct timespec {
|
||||||
int nanosleep(const struct timespec *, struct timespec *);
|
int nanosleep(const struct timespec *, struct timespec *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_TCGETPGRP
|
||||||
|
pid_t tcgetpgrp(int);
|
||||||
|
#endif /* HAVE_TCGETPGRP */
|
||||||
|
|
||||||
#endif /* _BSD_MISC_H */
|
#endif /* _BSD_MISC_H */
|
||||||
|
|
Loading…
Reference in New Issue