to the X11 server if Linux epoll event handling is being used, because You can view, comment on, or merge this pull request online at:https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/550 Commit Summary
File ChangesPatch Links:
— |
IMO, not a good fix. — |
In reply to this post by David T Lewis
Isn't there a way to duplicate fd's on fork, so that the child can close them at will without harm? — |
In reply to this post by David T Lewis
No, from what I understand, the file-descriptors are duped anyway (they are in the process space), but the file descriptions are shared (in the kernel space). The duped fd point to shared objects... — |
In reply to this post by David T Lewis
Regarding — |
In reply to this post by David T Lewis
Ouch, you're right, close-on-exec does close on exec as the name tells... — |
In reply to this post by David T Lewis
I made a couple of commits to the Cog branch that provide error messages on stderr rather than segfault the VM. This shows clearly that after a fork, the X11 event notification for the child process is being delivered to both the child VM and the parent VM, and also that the kernel is supplying empty event data to the parent when this happens. — |
In reply to this post by David T Lewis
I suspect that for epoll, the rule should be never unregister the fd if you are also going to close the fd. This would be different from non-epoll event event handling, so possibly there would be a need for e.g. aioDisableAndClose(fd) in addition to the existing aioDisable(fd). Or maybe is it sufficient to just reopen the aiofd after a fork as suggested above. — |
In reply to this post by David T Lewis
Closed #550. — |
In reply to this post by David T Lewis
Closing the PR because the solution is not sufficient. I will open a different PR to close and reopen the epoll fd based on the suggestions above and in issue #548. — |
Free forum by Nabble | Edit this page |