In classic NSPR (user-level threads only), we need to wrap the select() and poll() functions. To do this our wrapper functions must have a way to invoke the real (original) select() or poll() function. Usually there is an internal symbol such as _select that we can use. However, on Linux there is no internal symbol for poll() that is universally available. Moreover, it is not a good idea to use these _xxx internal symbols. Mike Shaver pointed out that the GNU linker has a --wrap symbol option for wrapping symbols: --wrap symbol Use a wrapper function for symbol. Any undefined reference to symbol will be resolved to __wrap_sym- bol. Any undefined reference to __real_symbol will be resolved to symbol. We can use the --wrap symbol linker option to wrap poll() and select(). However, this means any program or library using classic NSPR will need to be linked with --wrap poll --wrap select. I am not sure if that is possible. For example, if a library (.so) that comes with the Linux OS calls poll() or select(), we will need to relink that library with --wrap poll --wrap select.
http://www.lh.com/~oleg/ftp/syscall-interpose.html has some examples of doing this for open, with GNU ld, and with HP-UX and Solaris ld's.
This bug, and it's patch, seems to have fallen through the cracks, because it's not assigned to the default module owner. Reassigning. Please note - this bug has a patch attached, so should be evaluated ASAP. Gerv
Assignee: wtc → larryh
Status: ASSIGNED → NEW
QA Contact: srinivas → larryh
Reassigned the bug to me. I probably will not bother to fix this as pthreads are preferred over NSPR user-level threads.
Assignee: larryh → wtc
Status: ASSIGNED → NEW
*** Bug 124175 has been marked as a duplicate of this bug. ***
Please don't let this "fall through the cracks" again, now that 124175 has been united with it. It is most awkward when using "Paste as quotation" to have big paragraphs disappear miles to the right!
Bug 124175 was incorrectly marked as a duplicate of this bug. Marked the bug WONTFIX for the reason stated in comment 4.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.