errno

Linux specific forum
User avatar
idle
Always Here
Always Here
Posts: 5844
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

errno

Post by idle »

how would I get the last errno in PB for linux?
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Re: errno

Post 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())))
Athlon64 3700+, 1024MB Ram, Radeon X1600
User avatar
idle
Always Here
Always Here
Posts: 5844
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: errno

Post by idle »

thanks I wanted to know for checking socket errors.
Post Reply