Home
last modified time | relevance | path

Searched refs:fileno (Results 1 – 25 of 534) sorted by relevance

12345678910>>...22

/external/python/cpython2/Lib/hotshot/
Dlog.py50 def fileno(self): member in LogReader
52 return self._reader.fileno()
68 def get_filename(self, fileno): argument
70 return self._filemap[fileno]
79 for fileno, name in self._filemap.items():
81 return fileno
84 def get_funcname(self, fileno, lineno): argument
86 return self._funcmap[(fileno, lineno)]
98 what, tdelta, fileno, lineno = self._nextitem()
103 filename, funcname = self._decode_location(fileno, lineno)
[all …]
/external/python/cpython3/Lib/test/
Dtest_epoll.py72 self.assertTrue(ep.fileno() > 0, ep.fileno())
76 self.assertRaises(ValueError, ep.fileno)
100 self.assertGreater(ep.fileno(), 0)
103 self.assertRaises(ValueError, ep.fileno)
110 ep.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT)
111 ep.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT)
147 ep2 = select.epoll.fromfd(ep.fileno())
149 ep2.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT)
150 ep2.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT)
169 ep.register(server.fileno(),
[all …]
Dtest_kqueue.py17 self.assertTrue(kq.fileno() > 0, kq.fileno())
21 self.assertRaises(ValueError, kq.fileno)
128 kq2 = select.kqueue.fromfd(kq.fileno())
130 ev = select.kevent(server.fileno(),
134 ev = select.kevent(server.fileno(),
138 ev = select.kevent(client.fileno(),
142 ev = select.kevent(client.fileno(),
150 (client.fileno(), select.KQ_FILTER_WRITE),
151 (server.fileno(), select.KQ_FILTER_WRITE)]))
167 (client.fileno(), select.KQ_FILTER_WRITE),
[all …]
Dtest_largefile.py27 current_size = os.fstat(f.fileno())[stat.ST_SIZE]
38 self.assertEqual(os.fstat(f.fileno())[stat.ST_SIZE], size+1)
93 self.assertEqual(os.lseek(f.fileno(), 0, 0), 0)
94 self.assertEqual(os.lseek(f.fileno(), 42, 0), 42)
95 self.assertEqual(os.lseek(f.fileno(), 42, 1), 84)
96 self.assertEqual(os.lseek(f.fileno(), 0, 1), 84)
97 self.assertEqual(os.lseek(f.fileno(), 0, 2), size+1+0)
98 self.assertEqual(os.lseek(f.fileno(), -10, 2), size+1-10)
99 self.assertEqual(os.lseek(f.fileno(), -size-1, 2), 0)
100 self.assertEqual(os.lseek(f.fileno(), size, 0), size)
Dtest_fcntl.py51 def fileno(self): member in BadFile
67 rv = fcntl.fcntl(self.f.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
70 rv = fcntl.fcntl(self.f.fileno(), fcntl.F_SETLKW, lockdata)
130 fileno = self.f.fileno()
131 fcntl.flock(fileno, fcntl.LOCK_SH)
132 fcntl.flock(fileno, fcntl.LOCK_UN)
135 fcntl.flock(fileno, fcntl.LOCK_EX)
136 fcntl.flock(fileno, fcntl.LOCK_UN)
Dtest_mmap.py39 m = mmap.mmap(f.fileno(), 2 * PAGESIZE)
128 m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_READ)
181 m = mmap.mmap(f.fileno(), mapsize+1)
201 m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_WRITE)
215 m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_COPY)
230 self.assertRaises(ValueError, mmap.mmap, f.fileno(), mapsize, access=4)
235 self.assertRaises(ValueError, mmap.mmap, f.fileno(), mapsize,
242 m = mmap.mmap(f.fileno(), mapsize, prot=prot)
260 m = mmap.mmap(f.fileno(), n)
276 m = mmap.mmap(f.fileno(), n)
[all …]
Dtest_winconsoleio.py45 self.assertEqual(0, f.fileno())
57 self.assertEqual(1, f.fileno())
69 self.assertEqual(2, f.fileno())
79 self.assertIsNotNone(f.fileno())
86 self.assertIsNotNone(f.fileno())
93 self.assertIsNotNone(f.fileno())
Dtest_select.py16 def fileno(self): member in SelectTestCase.Almost
31 fd = fp.fileno()
72 def fileno(self): member in SelectTestCase.test_select_mutated.F
74 return sys.__stdout__.fileno()
/external/python/cpython2/Lib/test/
Dtest_epoll.py73 self.assertTrue(ep.fileno() > 0, ep.fileno())
77 self.assertRaises(ValueError, ep.fileno)
92 ep.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT)
93 ep.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT)
129 ep2 = select.epoll.fromfd(ep.fileno())
131 ep2.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT)
132 ep2.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT)
151 ep.register(server.fileno(),
153 ep.register(client.fileno(),
162 expected = [(client.fileno(), select.EPOLLOUT),
[all …]
Dtest_kqueue.py18 self.assertTrue(kq.fileno() > 0, kq.fileno())
22 self.assertRaises(ValueError, kq.fileno)
25 fd = sys.stderr.fileno()
128 kq2 = select.kqueue.fromfd(kq.fileno())
130 ev = select.kevent(server.fileno(),
134 ev = select.kevent(server.fileno(),
138 ev = select.kevent(client.fileno(),
142 ev = select.kevent(client.fileno(),
150 (client.fileno(), select.KQ_FILTER_WRITE),
151 (server.fileno(), select.KQ_FILTER_WRITE)]))
[all …]
Dtest_mmap.py33 m = mmap.mmap(f.fileno(), 2 * PAGESIZE)
124 m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_READ)
179 m = mmap.mmap(f.fileno(), mapsize+1)
201 m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_WRITE)
217 m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_COPY)
232 self.assertRaises(ValueError, mmap.mmap, f.fileno(), mapsize, access=4)
238 self.assertRaises(ValueError, mmap.mmap, f.fileno(), mapsize,
246 m = mmap.mmap(f.fileno(), mapsize, prot=prot)
264 m = mmap.mmap(f.fileno(), n)
281 m = mmap.mmap(f.fileno(), n)
[all …]
Dtest_largefile.py49 self.assertEqual(os.fstat(f.fileno())[stat.ST_SIZE], size+1)
93 self.assertEqual(os.lseek(f.fileno(), 0, 0), 0)
94 self.assertEqual(os.lseek(f.fileno(), 42, 0), 42)
95 self.assertEqual(os.lseek(f.fileno(), 42, 1), 84)
96 self.assertEqual(os.lseek(f.fileno(), 0, 1), 84)
97 self.assertEqual(os.lseek(f.fileno(), 0, 2), size+1+0)
98 self.assertEqual(os.lseek(f.fileno(), -10, 2), size+1-10)
99 self.assertEqual(os.lseek(f.fileno(), -size-1, 2), 0)
100 self.assertEqual(os.lseek(f.fileno(), size, 0), size)
/external/python/cpython3/Lib/
Dsocket.py139 def __init__(self, family=-1, type=-1, proto=-1, fileno=None): argument
144 if fileno is None:
151 _socket.socket.__init__(self, family, type, proto, fileno)
171 self.fileno(),
200 fd = dup(self.fileno())
201 sock = self.__class__(self.family, self.type, self.proto, fileno=fd)
213 sock = socket(self.family, self.type, self.proto, fileno=fd)
267 sockno = self.fileno()
269 fileno = file.fileno()
273 fsize = os.fstat(fileno).st_size
[all …]
/external/skqp/src/ports/
DSkOSFile_win.cpp41 int fileno = _fileno((FILE*)f); in sk_ino() local
42 if (fileno < 0) { in sk_ino()
46 HANDLE file = (HANDLE)_get_osfhandle(fileno); in sk_ino()
86 void* sk_fdmmap(int fileno, size_t* length) { in sk_fdmmap() argument
87 HANDLE file = (HANDLE)_get_osfhandle(fileno); in sk_fdmmap()
123 int fileno = sk_fileno(f); in sk_fmmap() local
124 if (fileno < 0) { in sk_fmmap()
128 return sk_fdmmap(fileno, length); in sk_fmmap()
132 int fileno = sk_fileno(file); in sk_qread() local
133 HANDLE fileHandle = (HANDLE)_get_osfhandle(fileno); in sk_qread()
/external/skia/src/ports/
DSkOSFile_win.cpp41 int fileno = _fileno((FILE*)f); in sk_ino() local
42 if (fileno < 0) { in sk_ino()
46 HANDLE file = (HANDLE)_get_osfhandle(fileno); in sk_ino()
86 void* sk_fdmmap(int fileno, size_t* length) { in sk_fdmmap() argument
87 HANDLE file = (HANDLE)_get_osfhandle(fileno); in sk_fdmmap()
123 int fileno = sk_fileno(f); in sk_fmmap() local
124 if (fileno < 0) { in sk_fmmap()
128 return sk_fdmmap(fileno, length); in sk_fmmap()
132 int fileno = sk_fileno(file); in sk_qread() local
133 HANDLE fileHandle = (HANDLE)_get_osfhandle(fileno); in sk_qread()
/external/python/cpython2/Lib/
Dposixfile.py105 return posix.fdopen(posix.dup(self._file_.fileno()), self._file_.mode)
113 posix.dup2(self._file_.fileno(), fd)
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:
195 flock = fcntl.fcntl(self._file_.fileno(), cmd, flock)
/external/python/cpython2/Modules/
D_hotshot.c141 return PyInt_FromLong(fileno(self->logfp)); in logreader_fileno()
392 int fileno = -1; in logreader_tp_iternext() local
421 err = unpack_packed_int(self, &fileno, 2); in logreader_tp_iternext()
440 err = unpack_packed_int(self, &fileno, 0); in logreader_tp_iternext()
450 err = unpack_packed_int(self, &fileno, 0); in logreader_tp_iternext()
488 PyTuple_SET_ITEM(result, 2, PyInt_FromLong(fileno)); in logreader_tp_iternext()
515 fileno = ((self->buffer[self->index + 2] << 8) in logreader_tp_iternext()
660 pack_define_file(ProfilerObject *self, int fileno, const char *filename) in pack_define_file() argument
670 if (pack_packed_int(self, fileno) < 0) in pack_define_file()
676 pack_define_func(ProfilerObject *self, int fileno, int lineno, in pack_define_func() argument
[all …]
/external/python/cpython3/Lib/asyncio/
Dunix_events.py92 signal.set_wakeup_fd(self._csock.fileno())
325 fileno = file.fileno()
329 fsize = os.fstat(fileno).st_size
337 self._sock_sendfile_native_impl(fut, None, sock, fileno,
341 def _sock_sendfile_native_impl(self, fut, registered_fd, sock, fileno, argument
343 fd = sock.fileno()
351 self._sock_sendfile_update_filepos(fileno, offset, total_sent)
356 self._sock_sendfile_update_filepos(fileno, offset, total_sent)
361 sent = os.sendfile(fd, fileno, offset, blocksize)
366 fd, sock, fileno,
[all …]
Dwindows_events.py345 if pipe and pipe.fileno() != -1:
427 ov.WSARecv(conn.fileno(), nbytes, flags)
429 ov.ReadFile(conn.fileno(), nbytes)
450 ov.WSARecvInto(conn.fileno(), buf, flags)
452 ov.ReadFileInto(conn.fileno(), buf)
472 ov.WSASend(conn.fileno(), buf, flags)
474 ov.WriteFile(conn.fileno(), buf)
492 ov.AcceptEx(listener.fileno(), conn.fileno())
497 buf = struct.pack('@P', listener.fileno())
520 _overlapped.BindLocal(conn.fileno(), conn.family)
[all …]
/external/curl/src/
Dtool_main.h32 # define STDIN_FILENO fileno(stdin)
36 # define STDOUT_FILENO fileno(stdout)
40 # define STDERR_FILENO fileno(stderr)
/external/autotest/server/site_tests/autoupdate_EndToEndTest/
Dupdate_engine_performance_monitor.py203 os.dup2(si.fileno(), sys.stdin.fileno())
204 os.dup2(so.fileno(), sys.stdout.fileno())
205 os.dup2(se.fileno(), sys.stderr.fileno())
/external/chromium-trace/catapult/common/py_utils/py_utils/
Dlock.py84 hfile = win32file._get_osfhandle(target_file.fileno())
96 hfile = win32file._get_osfhandle(target_file.fileno())
111 fcntl.flock(target_file.fileno(), flags)
121 fcntl.flock(target_file.fileno(), fcntl.LOCK_UN)
/external/libjpeg-turbo/
Dcdjpeg.c118 setmode(fileno(stdin), O_BINARY); in read_stdin()
121 if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) { in read_stdin()
136 setmode(fileno(stdout), O_BINARY); in write_stdout()
139 if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { in write_stdout()
/external/toybox/toys/pending/
Duserdel.c45 if (fcntl(fileno(exfp), F_SETLK, &lock) < 0) in update_groupfiles()
52 while ((line = get_line(fileno(exfp))) != NULL){ in update_groupfiles()
78 fcntl(fileno(exfp), F_SETLK, &lock); in update_groupfiles()
82 fsync(fileno(newfp)); in update_groupfiles()
/external/openssh/
Dclientloop.c205 unset_nonblock(fileno(stdin)); in leave_non_blocking()
216 set_nonblock(fileno(stdin)); in enter_non_blocking()
487 len = read(fileno(stdin), buf, 1); in client_check_initial_eof_on_stdin()
564 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0) in client_check_window_change()
637 FD_SET(fileno(stdin), *readsetp); in client_wait_until_can_do_something()
641 FD_SET(fileno(stdout), *writesetp); in client_wait_until_can_do_something()
643 FD_SET(fileno(stderr), *writesetp); in client_wait_until_can_do_something()
725 atomicio(vwrite, fileno(stdout), buffer_ptr(bout), in client_suspend_self()
728 atomicio(vwrite, fileno(stderr), buffer_ptr(berr), in client_suspend_self()
1335 if (FD_ISSET(fileno(stdin), readset)) { in client_process_input()
[all …]

12345678910>>...22