On Mar 06, 2007, at 20:09 UTC, Dobbs, Paul wrote: > I'm trying to call a unix function (shmget) from RB. I seem to have > gotten the declare right, or at least partly right, but I'm getting a > return value of -1, which is an error. The error number is supposed > to be in errno. How do I get errno and find out what the error is?
errno is a global variable and not something you can access directly in RB, but you can declare to the perror() subroutine, which will read errno and stuff a description of its meaning into the string you give it. (See "man perror" for details.) Best, - Joe -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
