How can we get the last error occured in linux.
suppose there is a connect() func error in that case how to get the error that occured.

Recommended Answers

All 3 Replies

How can we get the last error occured in linux.
suppose there is a connect() func error in that case how to get the error that occured.

use gdb to get to the particular statement where the error ocurred.

Thanks for the rsp

ok i reached the particular statement
than what command should i use to get the error

than what command should i use to get the error

it should print the error by default.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.