Page 1 of 1

errno

Posted: Wed Feb 24, 2010 2:48 am
by idle
how would I get the last errno in PB for linux?

Re: errno

Posted: Wed Feb 24, 2010 8:43 pm
by remi_meier
Like this:

Code: Select all

ImportC ""
  errno_location() As "__errno_location"
EndImport


open_( "/tmp/llololol", 0, 0644 ) ; produces an error

Debug PeekS(strerror_(PeekL(errno_location())))

Re: errno

Posted: Fri Feb 26, 2010 8:00 am
by idle
thanks I wanted to know for checking socket errors.