errno is an integer variable defined in errnoh that is set b

errno is an integer variable, defined in errno.h, that is set by system calls and some library functions in the event of an error to indicate what went wrong. There are symbolic error names with distinct values that are defined on Linux. Each of which corresponds to a type of error. The string description of any of these error names can be retrieved by strerror defined in string.h. For example, the error name \"ENFILE\" has the string description \"Too many open files in system\", and \"ENOEXEC\" has the string description \"Exec format error\", and so. In addition, perror defined in stdio.h prints the description of a system error on the standard error device preceded by any string that you provide and colons. Answer the following questions using a table format. a. What are the error names and descriptions of the fork system call. b. List all error names and descriptions specifically related to file I/O.

Solution

a)
Fork error names and descriptions.
*) EAGAIN -> fork unable to allocate sufficient memory to copy parent page tables and allocate a task
structure for child.

*) EAGAIN -> Not possible to create new process dure to caller RLIMIT_NPROC resource limit reached.

*)ENOMEM -> fork failing in allocating necessary kernel structure due to memory tight.

-------------------------------------------------------------------------------------------------------

b)

*) 00 -> successful operation
*) 02 -> duplicated key
*) 05 -> optional file missing
*) 07 -> attempted close reel on file was not on tape.
*) 0M -> feature not supported.
*) 10 -> end of file
*) 14 -> relative key is too large
*) 21 -> primary key writeen out of sequence.
*) 22 -> duplicate key found but not allowed.
*) 30 nm -> error by os on setting system value
*) 35 -> file not found
*) 37.07 -> user not having authority to access file.
*) 38 -> file locked or previously closed.
*) 41 -> file already open
*) 42 -> file not open
*) 43 -> no current record
*) 91 -> password failure
*) 98 -> index is corrupt

 errno is an integer variable, defined in errno.h, that is set by system calls and some library functions in the event of an error to indicate what went wrong.

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site