Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 13 of 13) sorted by relevance

/login/
A Dlogin_tty.c43 __login_tty (int fd) in __login_tty() argument
47 if (__ioctl(fd, TIOCSCTTY, NULL) == -1) in __login_tty()
52 char *fdname = ttyname (fd); in __login_tty()
56 if (fd != 0) in __login_tty()
58 if (fd != 1) in __login_tty()
60 if (fd != 2) in __login_tty()
67 while (__dup2(fd, 0) == -1 && errno == EBUSY) in __login_tty()
69 while (__dup2(fd, 1) == -1 && errno == EBUSY) in __login_tty()
71 while (__dup2(fd, 2) == -1 && errno == EBUSY) in __login_tty()
73 if (fd > 2) in __login_tty()
[all …]
A Dtst-ptsname.c33 int ret = ptsname_r (fd, buf, buflen); in do_single_test()
68 int fd = posix_openpt (O_RDWR); in do_test() local
69 if (fd != -1) in do_test()
72 result |= do_single_test (fd, buf, 1, ERANGE); in do_test()
73 close (fd); in do_test()
80 fd = open (DEV_TTY, O_RDONLY); in do_test()
81 if (fd != -1) in do_test()
84 close (fd); in do_test()
91 fd = open (PTSNAME_EINVAL, O_RDWR | O_CREAT, 0600); in do_test()
92 if (fd != -1) in do_test()
[all …]
A Dtst-grantpt.c35 int fd, ret, err; in test_ebadf() local
37 fd = posix_openpt (O_RDWR); in test_ebadf()
38 if (fd == -1) in test_ebadf()
40 TEST_COMPARE (unlockpt (fd), 0); in test_ebadf()
42 xclose (fd); in test_ebadf()
43 ret = grantpt (fd); in test_ebadf()
52 TEST_COMPARE (unlockpt (fd), -1); in test_ebadf()
60 int fd, ret, err; in test_einval() local
63 TEST_VERIFY_EXIT (fd >= 0); in test_einval()
65 ret = grantpt (fd); in test_einval()
[all …]
A Dtst-updwtmpx.c53 int fd = create_temp_file ("tst-updwtmpx-", &path); in do_test() local
69 xftruncate (fd, 0); in do_test()
70 TEST_COMPARE (pwrite64 (fd, &pad, misaligned_start, 0), in do_test()
78 TEST_COMPARE (xlseek (fd, 0, SEEK_END), sizeof (struct utmpx)); in do_test()
80 TEST_COMPARE (pread64 (fd, &buffer, sizeof (buffer), 0), in do_test()
86 TEST_COMPARE (pwrite64 (fd, &pad, misaligned_middle, in do_test()
94 TEST_COMPARE (xlseek (fd, 0, SEEK_END), 2 * sizeof (struct utmpx)); in do_test()
95 TEST_COMPARE (pread64 (fd, &buffer, sizeof (buffer), 0), in do_test()
99 TEST_COMPARE (pread64 (fd, &buffer, sizeof (buffer), sizeof (buffer)), in do_test()
107 xclose (fd); in do_test()
A Dptsname_r_chk.c22 __ptsname_r_chk (int fd, char *buf, size_t buflen, size_t nreal) in __ptsname_r_chk() argument
27 return __ptsname_r (fd, buf, buflen); in __ptsname_r_chk()
A Dptsname.c26 ptsname (int fd __attribute__ ((unused))) in ptsname() argument
33 __ptsname_r (int fd __attribute__ ((unused)), in __ptsname_r() argument
A Dutmp_file.c80 try_file_lock (int fd, int type) in try_file_lock() argument
121 file_unlock (int fd) in file_unlock() argument
127 __fcntl64_nocancel (fd, F_SETLKW, &fl); in file_unlock()
463 int fd; in __libc_updwtmp() local
467 if (fd < 0) in __libc_updwtmp()
470 if (try_file_lock (fd, F_WRLCK)) in __libc_updwtmp()
472 __close_nocancel_nostatus (fd); in __libc_updwtmp()
481 __ftruncate64 (fd, offset); in __libc_updwtmp()
493 __ftruncate64 (fd, offset); in __libc_updwtmp()
500 file_unlock (fd); in __libc_updwtmp()
[all …]
A Dunlockpt.c25 unlockpt (int fd __attribute__ ((unused))) in unlockpt() argument
A Dgrantpt.c25 grantpt (int fd __attribute__ ((unused))) in grantpt() argument
A Dtst-pututxline-lockfail.c73 int fd = xopen (path, O_RDONLY, 0); in subprocess_lock_file() local
80 TEST_COMPARE (fcntl64 (fd, F_SETLKW, &fl), 0); in subprocess_lock_file()
89 xclose (fd); in subprocess_lock_file()
A Dlogin.c32 tty_name (int fd, char **tty, size_t buf_len) in tty_name() argument
43 rv = __ttyname_r (fd, buf, buf_len); in tty_name()
A Dopenpty.c34 pts_name (int fd, char **pts, size_t buf_len) in pts_name() argument
45 rv = __ptsname_r (fd, buf, buf_len); in pts_name()
A Dtst-utmp.c54 int fd; variable
67 fd = mkstemp (name); in do_prepare()
68 if (fd == -1) in do_prepare()

Completed in 29 milliseconds