Home
last modified time | relevance | path

Searched refs:sfd (Results 1 – 16 of 16) sorted by relevance

/openbsd/regress/sys/kern/signal/sigio/
H A Dsigio_common.c61 int arg, sfd; in test_common_badsession() local
69 test_barrier(sfd); in test_common_badsession()
86 test_barrier(sfd); in test_common_badsession()
98 int flags, sfd; in test_common_cansigio() local
111 test_barrier(sfd); in test_common_cansigio()
112 test_barrier(sfd); in test_common_cansigio()
116 test_barrier(sfd); in test_common_cansigio()
121 test_barrier(sfd); in test_common_cansigio()
122 test_barrier(sfd); in test_common_cansigio()
195 int flags, sfd; in test_common_read() local
[all …]
H A Dutil.c95 test_barrier(int sfd) in test_barrier() argument
99 assert(write(sfd, &b, 1) == 1); in test_barrier()
100 assert(read(sfd, &b, 1) == 1); in test_barrier()
126 test_wait(pid_t pid, int sfd) in test_wait() argument
130 close(sfd); in test_wait()
H A Dsigio_socket.c76 int cli, flags, sfd, sock; in test_socket_inherit() local
91 if (test_fork(&pid, &sfd) == PARENT) { in test_socket_inherit()
99 test_barrier(sfd); in test_socket_inherit()
117 test_barrier(sfd); in test_socket_inherit()
125 return test_wait(pid, sfd); in test_socket_inherit()
/openbsd/regress/sys/kern/pty/
H A Dptyhog.c47 int mfd, sfd, status; in main() local
55 if (openpty(&mfd, &sfd, NULL, NULL, NULL) == -1) in main()
57 if (tcgetattr(sfd, &term) == -1) in main()
60 if (tcsetattr(sfd, TCSAFLUSH, &term) == -1) in main()
76 n = read(sfd, buf + nread, sizeof(buf) - nread); in main()
/openbsd/usr.sbin/installboot/
H A Dutil.c42 int sfd, dfd; in filecopy() local
45 sfd = open(srcfile, O_RDONLY); in filecopy()
46 if (sfd == -1) { in filecopy()
50 if (fstat(sfd, &sb) == -1) { in filecopy()
78 if ((n = read(sfd, buf, n)) == -1) { in filecopy()
94 close(sfd); in filecopy()
/openbsd/gnu/usr.bin/binutils/gdb/rdi-share/
H A Detherdrv.c182 int sfd; in open_socket() local
192 if ((sfd = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET) in open_socket()
195 if ((sfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) in open_socket()
217 if (ioctlsocket(sfd, FIONBIO, &yesplease) < 0) in open_socket()
222 closesocket(sfd); in open_socket()
235 if (bind(sfd, (struct sockaddr *)&local, sizeof(local)) < 0) in open_socket()
240 closesocket(sfd); in open_socket()
248 return sfd; in open_socket()
/openbsd/regress/usr.sbin/syslogd/
H A Dttylog.c44 int mfd, sfd; variable
90 if (openpty(&mfd, &sfd, ptyname, NULL, NULL) == -1) in main()
98 if (dup2(sfd, 1) == -1) in main()
162 if (ioctl(sfd, TIOCCONS, &on) == -1) in redirect()
185 if (ioctl(sfd, TIOCCONS, &on) == -1) in restore()
/openbsd/lib/libtls/
H A Dtls_client.c171 int sfd = ctx->config->session_fd; in tls_client_read_session() local
180 if (fstat(sfd, &sb) == -1) { in tls_client_read_session()
199 n = pread(sfd, session, session_len, 0); in tls_client_read_session()
234 int sfd = ctx->config->session_fd; in tls_client_write_session() local
245 if (ftruncate(sfd, 0) == -1) { in tls_client_write_session()
263 if (ftruncate(sfd, len) == -1) { in tls_client_write_session()
269 if ((n = pwrite(sfd, data + offset, len, offset)) == -1) { in tls_client_write_session()
/openbsd/regress/sys/kern/ptmget/
H A Dptmget.c39 if ((tcgetattr(ptm.sfd, &ti) == -1)) in main()
43 if ((ioctl(ptm.sfd, TIOCSTOP) == -1)) in main()
/openbsd/lib/libc/stdlib/
H A Dposix_pty.c48 close(ptm.sfd); in posix_openpt()
/openbsd/lib/libutil/
H A Dpty.c83 slave = ptm.sfd; in fdopenpty()
/openbsd/usr.sbin/nsd/
H A Dacx_nlnetlabs.m41046 int sfd, cfd;
1059 sfd = socket(PF_INET, SOCK_DGRAM, 0);
1060 if(sfd == -1) {
1068 if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
1072 if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
1110 FD_SET(sfd, &rset);
1111 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
1117 if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
1127 recv(sfd, &x, sizeof(x), 0);
1135 close(sfd);
H A Dconfigure7603 int sfd, cfd;
7616 sfd = socket(PF_INET, SOCK_DGRAM, 0);
7617 if(sfd == -1) {
7625 if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
7629 if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
7667 FD_SET(sfd, &rset);
7668 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
7674 if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
7684 recv(sfd, &x, sizeof(x), 0);
7692 close(sfd);
/openbsd/usr.sbin/unbound/
H A Dacx_nlnetlabs.m41046 int sfd, cfd;
1059 sfd = socket(PF_INET, SOCK_DGRAM, 0);
1060 if(sfd == -1) {
1068 if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
1072 if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
1110 FD_SET(sfd, &rset);
1111 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
1117 if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
1127 recv(sfd, &x, sizeof(x), 0);
1135 close(sfd);
/openbsd/sys/sys/
H A Dtty.h69 int sfd; member
/openbsd/sys/kern/
H A Dtty_pty.c1188 ptm->sfd = sindx; in ptmioctl()