ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libptytty/src/ptytty.C
(Generate patch)

Comparing libptytty/src/ptytty.C (file contents):
Revision 1.29 by ayin, Thu Jun 28 17:41:01 2007 UTC vs.
Revision 1.30 by ayin, Thu Jun 28 17:46:18 2007 UTC

122 122
123 static int 123 static int
124 get_pty (int *fd_tty, char **ttydev) 124 get_pty (int *fd_tty, char **ttydev)
125 { 125 {
126 int pfd; 126 int pfd;
127 char *slave;
127 128
128 *ttydev = _getpty (&pfd, O_RDWR | O_NONBLOCK | O_NOCTTY, 0622, 0); 129 slave = _getpty (&pfd, O_RDWR | O_NONBLOCK | O_NOCTTY, 0622, 0);
129 130
130 if (*ttydev != NULL) 131 if (slave != NULL) {
132 *ttydev = strdup (slave);
131 return pfd; 133 return pfd;
134 }
132 135
133 return -1; 136 return -1;
134 } 137 }
135 138
136#elif defined(HAVE_DEV_PTC) 139#elif defined(HAVE_DEV_PTC)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines