Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion subprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -2022,9 +2022,9 @@ int subprocess_terminate(struct subprocess_s *const process) {
#endif
}

#if defined(_WIN32)
unsigned subprocess_read_stdout(struct subprocess_s *const process,
char *const buffer, unsigned size) {
#if defined(_WIN32)
void *handle;
unsigned long bytes_available = 0;
unsigned long bytes_read = 0;
Expand Down Expand Up @@ -2074,6 +2074,8 @@ unsigned subprocess_read_stdout(struct subprocess_s *const process,

return SUBPROCESS_CAST(unsigned, bytes_read);
#else
unsigned subprocess_read_stdout(struct subprocess_s *const process,
char *const buffer, size_t size) {
const int fd = fileno(process->stdout_file);
const ssize_t bytes_read = read(fd, buffer, size);

Expand Down