How to check why a write failed?

by bag   Last Updated November 20, 2017 15:00 PM

If I was to debug a service on a machine and I determined that a write was failing, how could I check why the write failed?

I know the system call in C will return -1 and then we can check what constant int errno contains (EINVAL,etc.). However, if I'm not able to check this how would I go about checking the cause of the error? Would dmesg show an error at the block device level for me in this case?

Tags : linux io debugging


Related Questions


How to find IP address of ADSL modem?

Updated June 28, 2015 19:00 PM

How to debug "HTTP request sent, awaiting response"?

Updated February 22, 2017 12:00 PM


First-chance exception

Updated June 04, 2016 08:00 AM