Don't close file descriptors in .target.bash calls (bsc#1218064) #166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
With Ruby 3.3, yast2.rpm build fails with "[ASYNC BUG] rb_thread_wakeup_timer_thread: write(3) EBADF"
See: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:I/yast2/standard/x86_64
It's because in
.target.bash
implementation we close file descriptors numbered 3 and above, not to leak them to daemons we start (bsc#223602)Solution
Don't close those FDs.
The original problem is meanwhile likely solved by starting daemons via systemd, which
A better solution would be to call Ruby's
rb_reserved_fd_p(fd)
API to avoid precisely its internal FDs, but yast-core technically doesn't depend on Ruby.Testing
Tested building yast-core and yast-yast2 in Staging:I, no error
Screenshots
N/A