Skip to content

Tag: error-handling

Accessing errno.h in assembly language

I want to access errno present in errno.h in assembly language in order to handle errors of write function call. I found somewhere that make call to _error in assembly language for this purpose but it is throwing errors as : My assembly code : ExitNewShell.asm How to access errno in assembly language? Answer You’re making x86 Linux syscalls from

errno after accept in Linux socket programming

As stated in accept() man page in RETURN VALUE section: Error handling Linux accept() (and accept4()) passes already-pending network errors on the new socket as an error code from accept(). This behavior differs from other BSD socket implementations. For reliable operation the application should detect the network errors defined for the protocol after accept() and treat them like EAGAIN by