Hi guys, I am using NB FFI and I am calling a function that could answer a NULL* in case of error and that it should have set the number on *errno.*
So now I have some questions: Say the code is this: run | whatever | whatever := self *primitiveWhatever*. ^ popenFile ifNil: [ self *primitivePerror*. Imagine that the C lib called from #primitiveWhatever was the one setting *errno.* My question is... the following #primitivePerror is a DIFFERENT system call. Couldn't that happened that another error happened before the first system call and time I am executing the second one and so the "last error" (errno) is actually the wrong one I am thinking of? Even worst, I may think that the scope of the "global variable errno" may existed at the scope of the invoked lib only? In this case I don't have above problem, but then....how can I get such number once the NB primitive finished (so that I can call, for example, strerror() ? Thanks in advance, -- Mariano http://marianopeck.wordpress.com
