Home
last modified time | relevance | path

Searched refs:fcntl (Results 1 – 25 of 835) sorted by relevance

12345678910>>...34

/external/python/cpython3/Lib/test/
Dtest_fcntl.py12 fcntl = import_module('fcntl') variable
34 fcntl.F_WRLCK, 0)
36 lockdata = struct.pack('qqihhi', 0, 0, 0, fcntl.F_WRLCK, 0, 0)
38 lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
40 lockdata = struct.pack('hh'+start_len+'hh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)
67 rv = fcntl.fcntl(self.f.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
70 rv = fcntl.fcntl(self.f.fileno(), fcntl.F_SETLKW, lockdata)
78 rv = fcntl.fcntl(self.f, fcntl.F_SETFL, os.O_NONBLOCK)
81 rv = fcntl.fcntl(self.f, fcntl.F_SETLKW, lockdata)
88 fcntl.fcntl(-1, fcntl.F_SETFL, os.O_NONBLOCK)
[all …]
Dtest_ioctl.py5 fcntl = import_module('fcntl') variable
15 r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ")
34 r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ")
51 r = fcntl.ioctl(tty, termios.TIOCGPGRP, buf, 1)
83 new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_pos, our_winsz)
84 new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_maybe_neg, our_winsz)
/external/python/cpython2/Lib/test/
Dtest_fcntl.py14 fcntl = import_module('fcntl') variable
39 fcntl.F_WRLCK, 0)
41 lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
45 lockdata = struct.pack('hh'+start_len+'hh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)
73 rv = fcntl.fcntl(self.f.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
77 rv = fcntl.fcntl(self.f.fileno(), fcntl.F_SETLKW, lockdata)
85 rv = fcntl.fcntl(self.f, fcntl.F_SETFL, os.O_NONBLOCK)
87 rv = fcntl.fcntl(self.f, fcntl.F_SETLKW, lockdata)
92 fcntl.fcntl(-1, fcntl.F_SETFL, os.O_NONBLOCK)
94 fcntl.fcntl(BadFile(-1), fcntl.F_SETFL, os.O_NONBLOCK)
[all …]
Dtest_pty.py4 fcntl = import_module('fcntl') variable
101 orig_flags = fcntl.fcntl(master_fd, fcntl.F_GETFL)
102 fcntl.fcntl(master_fd, fcntl.F_SETFL, orig_flags | os.O_NONBLOCK)
110 fcntl.fcntl(master_fd, fcntl.F_SETFL, orig_flags)
Dtest_ioctl.py5 fcntl = import_module('fcntl') variable
15 r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ")
34 r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ")
51 r = fcntl.ioctl(tty, termios.TIOCGPGRP, buf, 1)
83 new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_pos, our_winsz)
84 new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_maybe_neg, our_winsz)
/external/python/cpython2/Lib/
Dposixfile.py117 import fcntl, os
133 cur_fl = fcntl.fcntl(file.fileno(), fcntl.F_GETFL, 0)
137 l_flags = fcntl.fcntl(file.fileno(), fcntl.F_SETFL, l_flags)
141 l_flags = fcntl.fcntl(file.fileno(), fcntl.F_SETFD, arg)
145 l_flags = fcntl.fcntl(file.fileno(), fcntl.F_GETFL, 0)
147 if fcntl.fcntl(file.fileno(), fcntl.F_GETFD, 0) & 1:
154 import struct, fcntl
156 if 'w' in how: l_type = fcntl.F_WRLCK
157 elif 'r' in how: l_type = fcntl.F_RDLCK
158 elif 'u' in how: l_type = fcntl.F_UNLCK
[all …]
/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl01.c75 if ((fd[2] = fcntl(fd[1], F_DUPFD, 1)) == -1) in main()
82 if ((fd[4] = fcntl(fd[1], F_DUPFD, fd2[3])) < 0) in main()
89 if ((fd[8] = fcntl(fd[1], F_DUPFD, fd2[5])) < 0) in main()
96 flags = fcntl(fd[2], F_GETFL, 0); in main()
102 if (fcntl(fd[2], F_SETFL, O_NDELAY) == -1) in main()
105 flags = fcntl(fd[2], F_GETFL, 0); in main()
111 if (fcntl(fd[2], F_SETFL, O_APPEND) == -1) in main()
114 flags = fcntl(fd[2], F_GETFL, 0); in main()
120 if (fcntl(fd[2], F_SETFL, O_NDELAY | O_APPEND) < 0) in main()
123 flags = fcntl(fd[2], F_GETFL, 0); in main()
[all …]
Dfcntl31.c114 if (fcntl(test_fd, F_SETFL, O_ASYNC) < 0) in setup()
131 TEST(fcntl(test_fd, F_GETOWN_EX, &orig_own_ex)); in setup()
140 TEST(fcntl(test_fd, F_GETOWN)); in setup()
160 TEST(fcntl(test_fd, F_SETOWN, pid)); in setown_pid_test()
167 TEST(fcntl(test_fd, F_SETOWN, orig_pid)); in setown_pid_test()
176 TEST(fcntl(test_fd, F_SETOWN, -pgrp_pid)); in setown_pgrp_test()
184 TEST(fcntl(test_fd, F_SETOWN, orig_pid)); in setown_pgrp_test()
194 TEST(fcntl(test_fd, F_SETOWN_EX, &orig_own_ex)); in setownex_cleanup()
213 TEST(fcntl(test_fd, F_SETOWN_EX, &tst_own_ex)); in setownex_tid_test()
235 TEST(fcntl(test_fd, F_SETOWN_EX, &tst_own_ex)); in setownex_pid_test()
[all …]
Dfcntl13.c61 if (fcntl(1, F_BADCMD, 1) != -1) in main()
69 if (fcntl(1, F_SETLK, (void *)-1) != -1) { in main()
78 if (fcntl(1, F_SETLKW, (void *)-1) != -1) { in main()
87 if (fcntl(1, F_GETLK, (void *)-1) != -1) { in main()
104 if (fcntl(1, F_SETLK, &flock) != -1) in main()
111 if (fcntl(-1, F_GETLK, &flock) != -1) in main()
/external/python/cpython3/Doc/library/
Dfcntl.rst1 :mod:`fcntl` --- The ``fcntl`` and ``ioctl`` system calls
4 .. module:: fcntl
6 :synopsis: The fcntl() and ioctl() system calls.
17 interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. For a
18 complete description of these calls, see :manpage:`fcntl(2)` and
35 .. function:: fcntl(fd, cmd, arg=0)
40 in the :mod:`fcntl` module, using the same names as used in the relevant C
43 function is the integer return value of the C :c:func:`fcntl` call. When
46 passed to the C :c:func:`fcntl` call. The return value after a successful
54 If the :c:func:`fcntl` fails, an :exc:`OSError` is raised.
[all …]
/external/python/cpython2/Doc/library/
Dfcntl.rst1 :mod:`fcntl` --- The ``fcntl`` and ``ioctl`` system calls
4 .. module:: fcntl
6 :synopsis: The fcntl() and ioctl() system calls.
15 interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. For a
16 complete description of these calls, see :manpage:`fcntl(2)` and
27 .. function:: fcntl(fd, op[, arg])
32 in the :mod:`fcntl` module, using the same names as used in the relevant C
36 is the integer return value of the C :c:func:`fcntl` call. When the argument is
39 :c:func:`fcntl` call. The return value after a successful call is the contents
46 If the :c:func:`fcntl` fails, an :exc:`IOError` is raised.
[all …]
/external/clang/test/Sema/
Dwarn-type-safety.c127 static const int F_DUPFD_tag __attribute__(( type_tag_for_datatype(fcntl,int) )) = F_DUPFD;
128 static const int F_SETLK_tag __attribute__(( type_tag_for_datatype(fcntl,struct flock *) )) = F_SET…
130 int fcntl(int fd, int cmd, ...) __attribute__(( argument_with_type_tag(fcntl,3,2) ));
134 fcntl(0, F_DUPFD, 10); // no-warning in test_argument_with_type_tag()
135 fcntl(0, F_SETLK, f); // no-warning in test_argument_with_type_tag()
137fcntl(0, F_SETLK, 10); // expected-warning {{argument type 'int' doesn't match specified 'fcntl' t… in test_argument_with_type_tag()
138fcntl(0, F_DUPFD, f); // expected-warning {{argument type 'struct flock *' doesn't match specifie… in test_argument_with_type_tag()
142 fcntl(0, b ? F_DUPFD : F_SETLK, 10); // no-warning in test_tag_expresssion()
143 fcntl(0, b + F_DUPFD, 10); // no-warning in test_tag_expresssion()
144 fcntl(0, (b, F_DUPFD), 10); // expected-warning {{expression result unused}} in test_tag_expresssion()
/external/scapy/scapy/arch/bpf/
Dsupersocket.py8 import fcntl
62 fcntl.ioctl(self.ins, BIOCSBLEN, struct.pack('I', BPF_BUFFER_LENGTH))
69 fcntl.ioctl(self.ins, BIOCSETIF, struct.pack("16s16x", self.iface.encode()))
80 fcntl.ioctl(self.ins, BIOCIMMEDIATE, struct.pack('I', 1))
88 fcntl.ioctl(self.ins, BIOCSHDRCMPLT, struct.pack('i', 1))
110 fcntl.ioctl(self.ins, BIOCPROMISC, struct.pack('i', value))
127 ret = fcntl.ioctl(self.ins, BIOCGDLT, struct.pack('I', 0))
148 self.fd_flags = fcntl.fcntl(self.ins, fcntl.F_GETFL)
160 fcntl.fcntl(self.ins, fcntl.F_SETFL, new_fd_flags)
169 ret = fcntl.ioctl(self.ins, BIOCGSTATS, struct.pack("2I", 0, 0))
[all …]
/external/toolchain-utils/binary_search_tool/
Dbisect_driver.py21 import fcntl
62 current_args = fcntl.fcntl(f.fileno(), fcntl.F_GETFD)
63 fcntl.fcntl(f.fileno(), fcntl.F_SETFD, current_args | fcntl.FD_CLOEXEC)
68 lock_type = fcntl.LOCK_SH
70 lock_type = fcntl.LOCK_EX
73 fcntl.lockf(f, lock_type)
77 fcntl.lockf(f, fcntl.LOCK_UN)
/external/autotest/client/deps/lansim/src/py/
Dtuntap.py5 import fcntl
112 ifs = fcntl.ioctl(fd, pyiftun.TUNSETIFF,
129 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFMTU,
136 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFFLAGS,
143 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFFLAGS,
154 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFADDR,
170 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFADDR,
177 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFNETMASK,
187 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFHWADDR,
202 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFHWADDR,
/external/perfetto/src/base/
Dpipe.cc38 PERFETTO_CHECK(fcntl(*p.rd, F_SETFD, FD_CLOEXEC) == 0); in Create()
39 PERFETTO_CHECK(fcntl(*p.wr, F_SETFD, FD_CLOEXEC) == 0); in Create()
42 int cur_flags = fcntl(*p.rd, F_GETFL, 0); in Create()
44 PERFETTO_CHECK(fcntl(*p.rd, F_SETFL, cur_flags | O_NONBLOCK) == 0); in Create()
48 int cur_flags = fcntl(*p.wr, F_GETFL, 0); in Create()
50 PERFETTO_CHECK(fcntl(*p.wr, F_SETFL, cur_flags | O_NONBLOCK) == 0); in Create()
/external/chromium-trace/catapult/common/py_utils/py_utils/
Dlock.py28 import fcntl
29 LOCK_EX = fcntl.LOCK_EX
30 LOCK_SH = fcntl.LOCK_SH
31 LOCK_NB = fcntl.LOCK_NB
111 fcntl.flock(target_file.fileno(), flags)
121 fcntl.flock(target_file.fileno(), fcntl.LOCK_UN)
/external/tensorflow/tensorflow/tools/test/
Dupload_test_benchmarks.py85 import fcntl
126 fcntl.flock(fd, fcntl.LOCK_EX)
130 fcntl.flock(fd, fcntl.LOCK_UN)
135 fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
/external/bcc/examples/networking/dns_matching/
Ddns_matching.py9 import fcntl
77 fl = fcntl.fcntl(socket_fd, fcntl.F_GETFL)
78 fcntl.fcntl(socket_fd, fcntl.F_SETFL, fl & (~os.O_NONBLOCK))
/external/autotest/venv/lucifer/
Dleasing.py21 import fcntl
40 fcntl.lockf(f.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB)
162 fcntl.lockf(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
/external/chromium-trace/catapult/third_party/pyserial/serial/
Dserialposix.py15 import sys, os, fcntl, termios, struct, select, errno, time
27 FCNTL = fcntl
145 import array, fcntl
148 fcntl.ioctl(port.fd, IOSSIOSPEED, buf, 1)
449 s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
546 fcntl.ioctl(self.fd, TIOCSBRK)
548 fcntl.ioctl(self.fd, TIOCCBRK)
554 fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_RTS_str)
556 fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_RTS_str)
562 fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
[all …]
/external/autotest/client/bin/
Dautotestd4 import sys, os, subprocess, fcntl
40 fcntl.flock(exit_file, fcntl.LOCK_EX)
49 fcntl.flock(exit_file, fcntl.LOCK_UN)
Dautotestd_monitor4 import sys, os, signal, time, subprocess, fcntl
46 fcntl.flock(exit_code_file, fcntl.LOCK_EX)
55 fcntl.flock(exit_code_file, fcntl.LOCK_UN)
/external/python/oauth2client/oauth2client/contrib/
D_fcntl_opener.py16 import fcntl
56 fcntl.lockf(self._fh.fileno(), fcntl.LOCK_EX)
78 fcntl.lockf(self._fh.fileno(), fcntl.LOCK_UN)
/external/grpc-grpc/src/core/lib/iomgr/
Dsocket_utils_posix.cc41 flags = fcntl(fd, F_GETFL, 0); in grpc_accept4()
43 if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) != 0) goto close_and_error; in grpc_accept4()
46 flags = fcntl(fd, F_GETFD, 0); in grpc_accept4()
48 if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) != 0) goto close_and_error; in grpc_accept4()

12345678910>>...34