Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 78) sorted by relevance

1234

/curl/src/
H A Dtool_getpass.c147 tcgetattr(fd, &withecho); in ttyecho()
150 tcsetattr(fd, TCSANOW, &noecho); in ttyecho()
152 ioctl(fd, TCGETA, &withecho); in ttyecho()
155 ioctl(fd, TCSETA, &noecho); in ttyecho()
158 (void)fd; in ttyecho()
166 tcsetattr(fd, TCSAFLUSH, &withecho); in ttyecho()
168 ioctl(fd, TCSETA, &withecho); in ttyecho()
182 if(-1 == fd) in getpass_r()
188 nread = read(fd, password, buflen); in getpass_r()
200 if(STDIN_FILENO != fd) in getpass_r()
[all …]
H A Dtool_xattr.c83 static int xattr(int fd, in xattr() argument
96 err = fsetxattr(fd, attr, value, strlen(value), 0, 0); in xattr()
98 err = fsetxattr(fd, attr, value, strlen(value), 0); in xattr()
101 ssize_t rc = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, in xattr()
114 int fwrite_xattr(CURL *curl, const char *url, int fd) in fwrite_xattr() argument
117 int err = xattr(fd, "user.creator", "curl"); in fwrite_xattr()
124 err = xattr(fd, mappings[i].attr, value); in fwrite_xattr()
131 err = xattr(fd, "user.xdg.origin.url", nurl); in fwrite_xattr()
H A Dtool_setup.h79 int tool_ftruncate64(int fd, curl_off_t where);
82 #define ftruncate(fd,where) tool_ftruncate64(fd,where) argument
H A Dtool_util.c171 # define _get_osfhandle(fd) (fd) argument
178 int tool_ftruncate64(int fd, curl_off_t where) in tool_ftruncate64() argument
180 intptr_t handle = _get_osfhandle(fd); in tool_ftruncate64()
182 if(_lseeki64(fd, where, SEEK_SET) < 0) in tool_ftruncate64()
H A Dtool_cb_wrt.c70 int fd; in tool_create_output_file() local
72 fd = open(fname, O_CREAT | O_WRONLY | O_EXCL | O_BINARY, OPENMODE); in tool_create_output_file()
74 } while(fd == -1 && errno == EINTR); in tool_create_output_file()
75 if(config->file_clobber_mode == CLOBBER_NEVER && fd == -1) { in tool_create_output_file()
92 while(fd == -1 && /* have not successfully opened a file */ in tool_create_output_file()
99 fd = open(newname, O_CREAT | O_WRONLY | O_EXCL | O_BINARY, OPENMODE); in tool_create_output_file()
101 } while(fd == -1 && errno == EINTR); in tool_create_output_file()
111 if(fd != -1) { in tool_create_output_file()
112 file = fdopen(fd, "wb"); in tool_create_output_file()
114 close(fd); in tool_create_output_file()
H A Dtool_findfile.c79 int fd = open(c, O_RDONLY); in checkhome() local
80 if(fd >= 0) { in checkhome()
82 close(fd); in checkhome()
/curl/docs/examples/
H A Dfileupload.c39 FILE *fd; in main() local
41 fd = fopen("debugit", "rb"); /* open file to upload */ in main()
42 if(!fd) in main()
46 if(fstat(fileno(fd), &file_info) != 0) in main()
59 curl_easy_setopt(curl, CURLOPT_READDATA, fd); in main()
87 fclose(fd); in main()
/curl/lib/
H A Dwarnless.h66 ssize_t curlx_read(int fd, void *buf, size_t count);
68 ssize_t curlx_write(int fd, const void *buf, size_t count);
79 #define read(fd, buf, count) curlx_read(fd, buf, count) argument
81 #define write(fd, buf, count) curlx_write(fd, buf, count) argument
H A Dfile.c157 int fd; in file_connect() local
229 fd = -1; in file_connect()
252 file->fd = fd; in file_connect()
273 if(file->fd != -1) in file_done()
275 file->fd = -1; in file_done()
300 int fd; in file_upload() local
333 if(fd < 0) { in file_upload()
345 close(fd); in file_upload()
406 close(fd); in file_upload()
434 int fd; in file_do() local
[all …]
H A Dfopen.c101 int fd = -1; in Curl_fopen() local
134 fd = open(tempstore, O_WRONLY | O_CREAT | O_EXCL, (mode_t)(0600|sb.st_mode)); in Curl_fopen()
136 fd = open(tempstore, O_WRONLY | O_CREAT | O_EXCL, 0600|sb.st_mode); in Curl_fopen()
138 if(fd == -1) in Curl_fopen()
141 *fh = fdopen(fd, FOPEN_WRITETEXT); in Curl_fopen()
149 if(fd != -1) { in Curl_fopen()
150 close(fd); in Curl_fopen()
H A Dselect.c207 pfd[num].fd = readfd0; in Curl_socket_check()
213 pfd[num].fd = readfd1; in Curl_socket_check()
219 pfd[num].fd = writefd; in Curl_socket_check()
322 if(ufds[i].fd == CURL_SOCKET_BAD) in Curl_poll()
339 if(ufds[i].fd == CURL_SOCKET_BAD) in Curl_poll()
341 VERIFY_SOCK(ufds[i].fd); in Curl_poll()
344 if(ufds[i].fd > maxfd) in Curl_poll()
345 maxfd = ufds[i].fd; in Curl_poll()
351 FD_SET(ufds[i].fd, &fds_err); in Curl_poll()
458 cpfds->pfds[cpfds->n].fd = sock; in cpfds_add_sock()
[all …]
H A Dfile.h35 int fd; /* open file descriptor to read from! */ member
H A Dwarnless.c350 ssize_t curlx_read(int fd, void *buf, size_t count) in curlx_read() argument
352 return (ssize_t)read(fd, buf, curlx_uztoui(count)); in curlx_read()
355 ssize_t curlx_write(int fd, const void *buf, size_t count) in curlx_write() argument
357 return (ssize_t)write(fd, buf, curlx_uztoui(count)); in curlx_write()
/curl/tests/http/testenv/
H A Dhttpd.py146 with open(self._error_log, 'a') as fd:
147 fd.write('start of server\n')
149 fd.write('start of server\n')
233 fd.write(JSONEncoder().encode(data))
238 fd.write(JSONEncoder().encode(data))
240 with open(self._basic_passwords, 'w') as fd:
243 with open(self._digest_passwords, 'w') as fd:
247 fd.write('{"area":"digest"}\n')
248 with open(self._conf_file, 'w') as fd:
381 fd.write("\n".join(conf))
[all …]
H A Dcerts.py250 with open(cert_file, "wb") as fd:
251 fd.write(creds.cert_pem)
254 fd.write(c.cert_pem)
256 fd.write(creds.pkey_pem)
259 fd.write(creds.pkey_pem)
261 fd.write(creds.cert_pem)
264 fd.write(c.cert_pem)
265 fd.write(creds.pkey_pem)
280 fd.write(c.cert_pem)
302 with open(fpath) as fd:
[all …]
H A Dcaddy.py150 with open(os.path.join(self._docs_dir, 'data.json'), 'w') as fd:
154 fd.write(JSONEncoder().encode(data))
155 with open(self._conf_file, 'w') as fd:
176 fd.write("\n".join(conf))
/curl/tests/server/
H A Dsockfilt.c162 if(fd == fileno(stdin)) { in read_wincon()
166 return read(fd, buf, count); in read_wincon()
194 if(fd == fileno(stdout)) { in write_wincon()
642 int error, ret, fd; in select_ws() local
693 for(fd = 0; fd < nfds; fd++) { in select_ws()
719 data[nfd].fd = fd; in select_ws()
819 fd = data[i].fd; in select_ws()
832 else if(fd == fileno(stdout) || fd == fileno(stderr)) { in select_ws()
873 for(fd = 0; fd < nfds; fd++) { in select_ws()
874 if(FD_ISSET(fd, readfds)) in select_ws()
[all …]
H A Dmqttd.c436 rc = swrite(fd, (char *)packet, sendamount); in publish()
453 static int fixedheader(curl_socket_t fd, in fixedheader() argument
462 ssize_t rc = sread(fd, (char *)buffer, 2); in fixedheader()
476 rc = sread(fd, (char *)&buffer[i], 1); in fixedheader()
488 static curl_socket_t mqttit(curl_socket_t fd) in mqttit() argument
611 if(connack(dump, fd)) { in mqttit()
649 if(suback(dump, fd, packet_id)) { in mqttit()
662 if(suback(dump, fd, packet_id)) { in mqttit()
672 disconnect(dump, fd); in mqttit()
687 puback(dump, fd, 0); in mqttit()
[all …]
H A Dsocksd.c345 rc = (send)(fd, (char *)response, 8, 0); in socks4()
388 return socks4(fd, buffer, rc); in sockit()
416 rc = (send)(fd, (char *)response, 2, 0); in sockit()
724 curl_socket_t fd = c[i].clientfd; in incoming() local
725 FD_SET(fd, &fds_read); in incoming()
726 if((int)fd > maxfd) in incoming()
727 maxfd = (int)fd; in incoming()
728 fd = c[i].remotefd; in incoming()
729 FD_SET(fd, &fds_read); in incoming()
730 if((int)fd > maxfd) in incoming()
[all …]
/curl/tests/http/
H A Dtest_12_reuse.py89 with open(asfile, 'w') as fd:
90fd.write(f'h2 {env.domain1} {env.https_port} h3 {env.domain1} {env.https_port} "{expires}" 0 0')
111 with open(asfile, 'w') as fd:
112fd.write(f'h3 {env.domain1} {env.https_port} h2 {env.domain1} {env.https_port} "{expires}" 0 0')
133 with open(asfile, 'w') as fd:
134fd.write(f'h3 {env.domain1} {env.https_port} http/1.1 {env.domain1} {env.https_port} "{expires}" 0…
/curl/tests/libtest/
H A Dlib582.c47 static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention) in removeFd() argument
52 fprintf(stderr, "Remove socket fd %d\n", (int) fd); in removeFd()
55 if(sockets->sockets[i] == fd) { in removeFd()
67 static void addFd(struct Sockets *sockets, curl_socket_t fd, const char *what) in addFd() argument
73 fprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what); in addFd()
74 removeFd(sockets, fd, 0); in addFd()
92 sockets->sockets[sockets->count] = fd; in addFd()
H A Dlib530.c54 static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention) in removeFd() argument
59 fprintf(stderr, "Remove socket fd %d\n", (int) fd); in removeFd()
62 if(sockets->sockets[i] == fd) { in removeFd()
75 static int addFd(struct Sockets *sockets, curl_socket_t fd, const char *what) in addFd() argument
81 fprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what); in addFd()
82 removeFd(sockets, fd, 0); in addFd()
104 sockets->sockets[sockets->count] = fd; in addFd()
/curl/include/curl/
H A Dmprintf.h58 CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...)
67 CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args)
/curl/tests/certs/scripts/
H A Dgenroot.sh70 "$OPENSSL" genrsa -out "$PREFIX-ca.key" -passout fd:0 "$KEYSIZE" <<EOF
73 "$OPENSSL" req -config "$PREFIX-ca.prm" -new -key "$PREFIX-ca.key" -out "$PREFIX-ca.csr" -passin fd
/curl/tests/certs/
H A DServer-localhost.nn-sv.crt30 71:af:a5:fd:51:46:75:cd:78:e0:0c:52:99:41:4f:
65 85:8d:36:e6:db:82:8b:fd:51:a3:3d:42:4c:0d:fd:cf:0b:d8:
69 e5:12:80:5d:02:4c:61:48:95:a8:77:96:49:e2:17:87:fd:3b:
71 99:81:61:77:c4:a4:a2:25:f1:70:34:17:40:f7:cb:f3:fd:da:
73 db:74:3f:bf:8a:8d:06:54:48:fd:9e:88:e8:5d:d2:be:ee:b4:

Completed in 97 milliseconds

1234