Dave,
What about errno? Did you add #define _REENTRANT before the includes?
Yes. After excising USE_SYSCALLS and related code, the only remaining users of errno were fdetach.c and pipe.c. I added the defines in those files.
-- Dave
--brian
On Mon, 10 Nov 2003, Dave Grothe wrote:
> Done. > > I simply eliminated the USE_SYSCALLS. This greatly simplified those files. > > -- Dave > > At 05:41 AM 11/10/2003 Monday, Brian F. G. Bidulock wrote: > >Dave, > > > >When LiS is compiled with USE_SYSCALLS, you are using system calls > >from asm/unistd.h. These are non-thread-safe system calls. Is there > >some reason not to use the glibc2 (thread-safe) system calls instead? > > > >Also, even without USE_SYSCALLS (which doesn't occur on recent LiS > >releases anyway), the libc/fdetach.c file includes <errno.h> and > >refers to errno. Problem is that _REENTRANT is not defined before > >including <errno.h> making the entire function non-thread-safe (use > >of global errno). Same thing happens in libc/pipe.c. Also, strangely, > >if the program using libLiS is thread-safe, it will never see your > >errno manipulations because you are only manipulating the global errno > >and the thread will check the thread-specific errno. > > > >POSIX and XOPEN require thread safety of fattach, fdetach, and pipe. > > > >Strangely enough, the very function from libLiS that have thread > >safety destroyed in this fashion are not tested in thrtst.c (Neither > >is getmsg, getpmsg, putmsg, and putpmsg either). > > > >Can you add > > > >#define _REENTRANT > >#define _THREAD_SAFE > >#define _XOPEN_SOURCE 500 /* or greater */ > > > >before including <errno.h> in all the .c files in libc, and especially > >fattach.c, fdetach.c and pipe.c? Also, because the asm/unistd.h syscall > >wrappers are incompatible with glibc2, could you remove the USE_SYSCALLS > >bracketed code altogether and fall back on the glibc2 versions of putmsg, > >putpmsg, getmsg, getpmsg? > > > >--brian > > > >-- > >Brian F. G. Bidulock � The reasonable man adapts himself to the � > >[EMAIL PROTECTED] � world; the unreasonable one persists in � > >http://www.openss7.org/ � trying to adapt the world to himself. � > > � Therefore all progress depends on the � > > � unreasonable man. -- George Bernard Shaw � > > > >_______________________________________________ > >Linux-streams mailing list > >[EMAIL PROTECTED] > >http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams > > > _______________________________________________ > Linux-streams mailing list > [EMAIL PROTECTED] > http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
-- Brian F. G. Bidulock � The reasonable man adapts himself to the � [EMAIL PROTECTED] � world; the unreasonable one persists in � http://www.openss7.org/ � trying to adapt the world to himself. � � Therefore all progress depends on the � � unreasonable man. -- George Bernard Shaw �
_______________________________________________ Linux-streams mailing list [EMAIL PROTECTED] http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
_______________________________________________ Linux-streams mailing list [EMAIL PROTECTED] http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
