Skip to content

Conversation

@ouguangjun
Copy link

The code uses popen() to query GPU utilization but does not call pclose(). As a result, each update cycle leaks one file descriptor. After long-running sessions, the process reaches the FD limit (1024), causing failures in popen(), portable-file-dialogs, and UI features relying on fork/pipe.

This patch adds the missing pclose() and ensures proper cleanup.

Tested: FD count remains stable during long runtime after the fix.

The code uses popen() to query GPU utilization but does not call pclose().
As a result, each update cycle leaks one file descriptor. After long-running
sessions, the process reaches the FD limit (1024), causing failures in popen(),
portable-file-dialogs, and UI features relying on fork/pipe.

This patch adds the missing pclose() and ensures proper cleanup.

Tested: FD count remains stable during long runtime after the fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant