1/*- 2 * Copyright (c) 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#if defined(LIBC_SCCS) && !defined(lint) 35#if 0 36static char sccsid[] = "@(#)pty.c 8.3 (Berkeley) 5/16/94"; 37#else 38static const char rcsid[] = |
39 "$Id: pty.c,v 1.8 1998/10/09 11:24:20 jkh Exp $"; |
40#endif 41#endif /* LIBC_SCCS and not lint */ 42 43#include <sys/types.h> 44#include <sys/ioctl.h> 45#include <sys/stat.h> 46 47#include <errno.h> --- 7 unchanged lines hidden (view full) --- 55 56int 57openpty(amaster, aslave, name, termp, winp) 58 int *amaster, *aslave; 59 char *name; 60 struct termios *termp; 61 struct winsize *winp; 62{ |
63 char line[] = "/dev/ptyXX"; |
64 register const char *cp1, *cp2; 65 register int master, slave, ttygid; 66 struct group *gr; 67 68 if ((gr = getgrnam("tty")) != NULL) 69 ttygid = gr->gr_gid; 70 else 71 ttygid = -1; --- 64 unchanged lines hidden --- |