Searched refs:fd (Results 1 - 25 of 1127) sorted by relevance

1234567891011>>

/haiku-fatelf/src/bin/coreutils/lib/
H A Dfd-safer-flag.c40 fd_safer_flag (int fd, int flag) argument
42 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
44 int f = dup_safer_flag (fd, flag);
46 close (fd);
48 fd = f;
51 return fd;
H A Dfd-safer.c37 fd_safer (int fd) argument
39 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
41 int f = dup_safer (fd);
43 close (fd);
45 fd = f;
48 return fd;
H A Dclose.c27 rpl_close (int fd) argument
31 int retval = execute_all_close_hooks (fd);
33 int retval = close (fd);
38 _gl_unregister_fd (fd);
H A Disapipe.h6 int isapipe (int fd);
H A Dpipe-safer.c31 pipe_safer (int fd[2]) argument
34 if (pipe (fd) == 0)
39 fd[i] = fd_safer (fd[i]);
40 if (fd[i] < 0)
43 close (fd[1 - i]);
H A Ddirfd.c28 int fd = DIR_TO_FD (dir_p); local
29 if (fd == -1)
31 return fd;
H A Dfd-reopen.c22 #include "fd-reopen.h"
34 int fd = open (file, flags, mode); local
36 if (fd == desired_fd || fd < 0)
37 return fd;
40 int fd2 = dup2 (fd, desired_fd);
42 close (fd);
H A Dcloexec.h38 int dup_cloexec (int fd);
H A Ddup-safer.c31 dup_safer (int fd) argument
33 return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
H A Ddup2.c39 rpl_dup2 (int fd, int desired_fd) argument
43 /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open,
44 dup2 (fd, fd) returns 0, but all further attempts to use fd in
46 if (fd == desired_fd)
48 if ((HANDLE) _get_osfhandle (fd)
92 dupfd(int fd, int desired_fd) argument
109 dup2(int fd, int desired_fd) argument
[all...]
/haiku-fatelf/src/bin/findutils/gnulib/lib/
H A Dfd-safer.c44 fd_safer (int fd) argument
46 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
48 int f = dup_safer (fd);
50 close (fd);
52 fd = f;
55 return fd;
H A Dpipe-safer.c31 pipe_safer (int fd[2]) argument
34 if (pipe (fd) == 0)
39 fd[i] = fd_safer (fd[i]);
40 if (fd[i] < 0)
43 close (fd[1 - i]);
H A Ddup-safer.c35 dup_safer (int fd) argument
38 return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
42 return fd_safer (dup (fd));
H A Ddup2.c30 dupfd (int fd, int desired_fd) argument
32 int duplicated_fd = dup (fd);
37 int r = dupfd (fd, desired_fd);
47 dup2 (int fd, int desired_fd) argument
49 if (fd == desired_fd)
50 return fd;
53 return fcntl (fd, F_DUPFD, desired_fd);
55 return dupfd (fd, desired_fd);
/haiku-fatelf/src/tests/system/kernel/
H A Dselect_check.cpp26 for (int fd = 0; fd < 3; fd++) {
27 if (strchr(config[fd], 'r'))
28 FD_SET(fd, &readSet);
29 if (strchr(config[fd], 'w'))
30 FD_SET(fd, &writeSet);
31 if (strchr(config[fd], 'e'))
32 FD_SET(fd, &errorSet);
38 for (int fd
[all...]
/haiku-fatelf/src/libs/print/libgutenprint/src/escputil/
H A Dd4lib.h24 extern int EnterIEEE(int fd);
25 extern int Init(int fd);
26 extern int Exit(int fd);
27 extern int GetSocketID(int fd, const char *serviceName);
28 extern int OpenChannel(int fd, unsigned char sockId, int *sndSz, int *rcvSz);
29 extern int CloseChannel(int fd, unsigned char socketID);
30 extern int CreditRequest(int fd, unsigned char socketID);
31 extern int Credit(int fd, unsigned char socketID, int credit);
34 extern int SafeWrite(int fd, const void *data, int len);
35 extern int askForCredit(int fd, unsigne
[all...]
/haiku-fatelf/src/system/libroot/posix/glibc/include/
H A Dunistd.h7 #define __isatty(fd) \
8 isatty(fd)
10 #define __close(fd) \
11 close(fd)
13 #define __read(fd, buffer, size) \
14 read(fd, buffer, size)
16 #define __write(fd, buffer, size) \
17 write(fd, buffer, size)
19 #define __lseek(fd, pos, whence) \
20 lseek(fd, po
[all...]
/haiku-fatelf/src/libs/util/
H A Dlogin_tty.c51 login_tty(int fd) argument
54 if (ioctl(fd, TIOCSCTTY, (char *)NULL) == -1)
56 (void) dup2(fd, 0);
57 (void) dup2(fd, 1);
58 (void) dup2(fd, 2);
59 if (fd > 2)
60 (void) close(fd);
/haiku-fatelf/src/build/libroot/
H A Dremapped_functions.h12 int _haiku_build_fchmod(int fd, mode_t mode);
13 int _haiku_build_fchmodat(int fd, const char* path, mode_t mode, int flag);
14 int _haiku_build_fstat(int fd, struct stat* st);
15 int _haiku_build_fstatat(int fd, const char* path, struct stat* st,
17 int _haiku_build_mkdirat(int fd, const char* path, mode_t mode);
18 int _haiku_build_mkfifoat(int fd, const char* path, mode_t mode);
19 int _haiku_build_utimensat(int fd, const char* path,
21 int _haiku_build_futimens(int fd, const struct timespec times[2]);
22 int _haiku_build_faccessat(int fd, const char* path, int accessMode,
24 int _haiku_build_fchdir(int fd);
[all...]
H A Dfs_attr_bsdxattr.h21 list_attributes(int fd, const char* path, char* buffer, size_t bufferSize) argument
23 if (fd >= 0)
24 return flistxattr(fd, buffer, bufferSize, 0);
30 get_attribute(int fd, const char* path, const char* attribute, void* buffer, argument
33 if (fd >= 0)
34 return fgetxattr(fd, attribute, buffer, bufferSize, 0, 0);
40 set_attribute(int fd, const char* path, const char* attribute, argument
43 if (fd >= 0)
44 return fsetxattr(fd, attribute, buffer, bufferSize, 0, 0);
50 remove_attribute(int fd, cons argument
[all...]
H A Dfs_attr_xattr.h21 list_attributes(int fd, const char* path, char* buffer, size_t bufferSize) argument
23 if (fd >= 0)
24 return flistxattr(fd, buffer, bufferSize);
30 get_attribute(int fd, const char* path, const char* attribute, void* buffer, argument
33 if (fd >= 0)
34 return fgetxattr(fd, attribute, buffer, bufferSize);
40 set_attribute(int fd, const char* path, const char* attribute, argument
43 if (fd >= 0)
44 return fsetxattr(fd, attribute, buffer, bufferSize, 0);
50 remove_attribute(int fd, cons argument
[all...]
/haiku-fatelf/src/tests/kits/net/
H A Dstop_stack.c10 int fd; local
15 fd = open("/dev/" NET_STACK_DRIVER_PATH, O_RDWR);
16 if (fd < 0)
17 err(fd, "can't open the stack driver");
19 rv = ioctl(fd, NET_STACK_STOP, NULL, 0);
22 rv = close(fd);
/haiku-fatelf/headers/build/
H A DBeOSBuildCompatibility.h60 extern ssize_t read_pos(int fd, off_t pos, void* buffer, size_t count);
61 extern ssize_t write_pos(int fd, off_t pos, const void* buffer, size_t count);
62 extern ssize_t readv_pos(int fd, off_t pos, const struct iovec* vec,
64 extern ssize_t writev_pos(int fd, off_t pos, const struct iovec* vec,
99 int _haiku_build_fchmod(int fd, mode_t mode);
100 int _haiku_build_fchmodat(int fd, const char* path, mode_t mode, int flag);
101 int _haiku_build_fstat(int fd, struct stat* st);
102 int _haiku_build_fstatat(int fd, const char* path, struct stat* st,
104 int _haiku_build_mkdirat(int fd, const char* path, mode_t mode);
105 int _haiku_build_mkfifoat(int fd, cons
[all...]
/haiku-fatelf/src/tests/add-ons/kernel/file_systems/beserved/bt_fs/ksocket_v3/libksocket/
H A Dksocket.h8 int kbind (int fd, const struct sockaddr *addr, int size);
9 int kconnect (int fd, const struct sockaddr *addr, int size);
10 int kgetsockname (int fd, struct sockaddr *addr, int *size);
11 int kgetpeername (int fd, struct sockaddr *addr, int *size);
12 int kaccept (int fd, struct sockaddr *addr, int *size);
14 ssize_t krecvfrom (int fd, void *buf, size_t size, int flags,
17 ssize_t ksendto (int fd, const void *buf, size_t size, int flags,
20 ssize_t krecv (int fd, void *buf, size_t size, int flags);
21 ssize_t ksend (int fd, const void *buf, size_t size, int flags);
23 int klisten (int fd, in
[all...]
/haiku-fatelf/src/bin/bash/include/
H A Dfilecntl.h33 #define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC))
34 #define SET_OPEN_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_NCLOEXEC))

Completed in 143 milliseconds

1234567891011>>