Lines Matching refs:rc
103 int rc;
109 rc = poll(pfd, 1, -1);
110 if (rc < 0)
117 int rc;
121 rc = select(FD_SETSIZE, NULL, &fds, NULL, NULL);
122 if (rc < 0)
141 int rc;
148 rc = poll(pfd, 2, -1);
149 if (rc < 0) {
160 int rc;
165 rc = select(FD_SETSIZE, &fds, NULL, NULL, NULL);
166 if (rc < 0) {
185 int rc;
187 rc = ioctl(sfd, TIOCGWINSZ, (char *) &ws);
188 if (rc < 0)
190 rc = ioctl(dfd, TIOCSWINSZ, (char *) &ws);
191 if (rc < 0)
202 int rc;
209 rc = sigaction(signum, &sa, NULL);
210 return rc;
217 int rc;
219 rc = tcgetattr(sfd, &tio);
220 if (rc < 0)
223 rc = tcsetattr(dfd, TCSAFLUSH, &tio);
224 if (rc < 0)
233 int rc;
234 rc = tcgetattr(0, &saved_tio);
235 if (rc >= 0)
237 return rc;
252 int rc;
256 rc = tcgetattr(0, &tio);
257 if (rc < 0)
258 return rc;
275 rc = tcsetattr(0, TCSAFLUSH, &tio);
276 if (rc < 0)
277 return rc;
297 int rc;
300 rc = stat(line, &s);
301 if (rc < 0)
304 rc = chown(line, getuid(), getgid());
305 if (rc < 0) {
313 rc = chmod(line, S_IRUSR | S_IWUSR | S_IWGRP);
314 if (rc < 0) {
336 int rc;
346 rc = grantpt(pty);
347 if (rc < 0) {
352 rc = unlockpt(pty);
353 if (rc < 0) {
372 int rc;
375 rc = openpty(&pty, &opened_tty, ttydev, NULL, NULL);
376 if (rc < 0) {
431 int rc;
463 rc = ioctl(tty, TIOCSCTTY, (char *) 0);
464 if (rc < 0) {
470 rc = ioctl(tty, I_PUSH, "ptem");
471 if (rc < 0)
474 rc = ioctl(tty, I_PUSH, "ldterm");
475 if (rc < 0)
478 rc = ioctl(tty, I_PUSH, "ttcompat");
479 if (rc < 0)
497 int rc;
506 rc = -1;
508 rc = setuid(uid);
509 if (rc >= 0)
510 rc = setgid(gid);
513 rc = setuid(getuid());
514 if (rc >= 0) {
515 rc = setgid(getgid());
525 rc = -1;
527 rc = 0;
530 return rc;