Path: utzoo!mnetor!uunet!munnari!moncskermit!moncsbruce!cechew From: cechew@moncsbruce.oz (Earl Chew) Newsgroups: comp.os.minix Subject: Minix Library Reentrancy Message-ID: <433@moncsbruce.oz> Date: 2 May 88 06:08:16 GMT Organization: Comp Sci, Monash Uni, Australia Lines: 20 Keywords: Minix, Library Has anyone addressed the problem of reentrancy in the Minix library? I came across a problem the other day, which I think is due to the Minix library NOT being reentrant (or perhaps just most of it not being reentrant). I had a process which called signal(SIGALRM, do_alarm) and then called alarm(1). Within do_alarm() there is a subsequent call to signal() to reset the signal handler and a call alarm(1). The main body of the process goes about and does read(). STRANGE things happen. I think that the cause of this is that the library sends messages to Minix using a message structure M which is GLOBAL. read() and friends use this to summon Minix. So does signal() and alarm().... Comments? I've also noticed that atoi() (and a few others, but this one in particular) uses a static. Why, when automatics would suffice? Earl Chew