File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4602,14 +4602,14 @@ RLAPI int WaitProcess(Process process)
46024602
46034603RLAPI const char * ReadProcessOutput (Process process , int * length )
46044604{
4605- static char output [4096 ] = { 0 };
4606-
46074605 if (process .pid <= 0 )
46084606 {
46094607 return NULL ;
46104608 }
46114609
46124610#if defined(_WIN32 )
4611+ static char output [4096 ] = { 0 };
4612+
46134613 // Read from output pipe
46144614
46154615 // ReadFile will block if there is no data, so call PeekNamedPipe to check for data before reading
@@ -4631,6 +4631,8 @@ RLAPI const char *ReadProcessOutput(Process process, int *length)
46314631 * length = (int )bytesRead ;
46324632 return output ;
46334633#elif defined(__linux__ ) || defined(__FreeBSD__ ) || defined(__OpenBSD__ ) || defined(__APPLE__ )
4634+ static char output [4096 ] = { 0 };
4635+
46344636 struct pollfd fds [1 ];
46354637 fds [0 ].fd = process .processData -> pipefdStdout [0 ];
46364638 fds [0 ].events = POLLIN ;
You can’t perform that action at this time.
0 commit comments