Skip to content

Commit c5d7264

Browse files
committed
Fix file descriptor check
Technically 0 is a valid file descriptor
1 parent 13ad8ef commit c5d7264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_gdb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ ZEND_API bool zend_gdb_present(void)
113113
#if defined(__linux__) /* netbsd while having this procfs part, does not hold the tracer pid */
114114
int fd = open("/proc/self/status", O_RDONLY);
115115

116-
if (fd > 0) {
116+
if (fd >= 0) {
117117
char buf[1024];
118118
ssize_t n = read(fd, buf, sizeof(buf) - 1);
119119
char *s;

0 commit comments

Comments
 (0)