Lines Matching defs:flags
1288 DWORD flags;
1297 if (!GetHandleInformation(handle, &flags)) {
1303 return (flags & HANDLE_FLAG_INHERIT);
1305 int flags;
1307 flags = fcntl(fd, F_GETFD, 0);
1308 if (flags == -1) {
1313 return !(flags & FD_CLOEXEC);
1333 DWORD flags;
1340 int flags, new_flags;
1369 flags = HANDLE_FLAG_INHERIT;
1371 flags = 0;
1378 !SetHandleInformation(handle, HANDLE_FLAG_INHERIT, flags)) {
1433 flags = fcntl(fd, F_GETFD);
1434 if (flags < 0) {
1441 new_flags = flags & ~FD_CLOEXEC;
1444 new_flags = flags | FD_CLOEXEC;
1447 if (new_flags == flags) {
1502 _Py_open_impl(const char *pathname, int flags, int gil_held)
1511 flags |= O_NOINHERIT;
1514 flags |= O_CLOEXEC;
1524 if (PySys_Audit("open", "OOi", pathname_obj, Py_None, flags) < 0) {
1531 fd = open(pathname, flags);
1547 fd = open(pathname, flags);
1562 /* Open a file with the specified flags (wrapper to open() function).
1573 _Py_open(const char *pathname, int flags)
1577 return _Py_open_impl(pathname, flags, 1);
1580 /* Open a file with the specified flags (wrapper to open() function).
1587 _Py_open_noraise(const char *pathname, int flags)
1589 return _Py_open_impl(pathname, flags, 0);
2431 int flags;
2433 flags = fcntl(fd, F_GETFL, 0);
2435 if (flags < 0) {
2440 return !(flags & O_NONBLOCK);
2459 int flags, res;
2462 flags = fcntl(fd, F_GETFL, 0);
2463 if (flags >= 0) {
2465 flags = flags & (~O_NONBLOCK);
2467 flags = flags | O_NONBLOCK;
2469 res = fcntl(fd, F_SETFL, flags);
2506 _Py_open_osfhandle_noraise(void *handle, int flags)
2510 fd = _open_osfhandle((intptr_t)handle, flags);
2516 _Py_open_osfhandle(void *handle, int flags)
2518 int fd = _Py_open_osfhandle_noraise(handle, flags);