LibBSD | rtemsbsd/libio: Give a duplicated descriptor an identity of its own (!153)

Sang Woo Kim (@physwkim) gitlab at rtems.org
Thu Jul 30 12:14:21 UTC 2026




Sang Woo Kim commented on a discussion on rtemsbsd/rtems/rtems-bsd-syscall-api.c: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/153#note_155911

 >  #include <rtems/seterr.h>
 >  #include <stdio.h>
 >  
 > +static int rtems_bsd_pipe(int fildes[2], int flags);
 > +int pipe(int fildes[2]);
 > +int pipe2(int fildes[2], int flags);

Yes, it relies on `-lbsd` being searched before the kernel archive. One option: mark the cpukit `pipe()` implementation `RTEMS_WEAK` (precedent: `_Malloc_Process_deferred_frees`) so the choice is made by symbol strength rather than archive order — libbsd wins deterministically whenever both objects are loaded, and non-libbsd applications keep the cpukit implementation. I can file that as a small kernel MR if you and Joel prefer that direction.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/153#note_155911
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/4-e81afv5auy7vl92eqg0fdufj5-k/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260730/7e394461/attachment.htm>


More information about the bugs mailing list