Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle situations when the original routines fail #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MartinDrab
Copy link

THis is just basic handling that prevents adding invalid file descriptors into the descriptor array. Also, failures are not logged.

THis is just basic handling that prevents adding invalid file descriptors into the descriptor array. Also, failures are not logged.
@arkamar arkamar self-requested a review November 1, 2019 10:07
@@ -124,7 +124,7 @@ is_pts_fd(const int fd) {
int
open(const char * name, int flags, ...) {
int ret = libc.open(name, flags);
if (strstr(name, "/ptmx")) {
if (ret != -1 && strstr(name, "/ptmx")) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with preventing invalid file descriptor being add to the descriptor array, however we should not prevent logging. The same apply for all changed chunks.

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.

2 participants