On Thu, 26 Jan 2006, Matthias Scheler wrote: > On Thu, Jan 26, 2006 at 05:14:43PM +0200, Eugene Filatov wrote: > > My friend which which knows C told me that "usleep" is thread unsafe ... > Where does he have that information from? The Solaris 9 manual page says: > That mean it *is* thread safe. We have Solaris 8. And manual says that usleep is unsafe :( > > What about using "open, malloc+snprintf+write+free" in milter-greylist? > A memory large enough for the whole dump files would dramatically increase > the memory footprint of "milter-greylist". And you don't know how large the > buffer needs to be. Writing code for which manages a small buffer means > reimplementing a lot of stdio. I'm not very proficient in this area, but I think that it's possible to calculate site of each string and allocate memory per each string. > > It should be the best solution. > I disagree. It would mean writing and maintaing a lot of extra code just > because of a problem with 32Bit binaries under Solaris. I agree with you, it could be a big change to code. Do you see any ways which will _fix_ this problem under Solaris? Patch which I used is only decreases chances of getting problem but do not solve it. Another idea - is it possible to catch file descriptor wich less than 254 in the beginning and keep (reserve) it for future use when we will need to dump? Best Regards, mailto:eugenef@... Eugene.
Message
Re: [milter-greylist] milter-greylist-2.0.2 crash
2006-01-26 by Eugene Filatov
Attachments
- No local attachments were found for this message.