Question: c code make the read and write wrappers for the read and write system calls. the routines will echo the data read and written to

c code

make the read and write wrappers for the read and write system calls. the routines will echo the data read and written to a file named .logfile in the current directory. Any call should create the file .logfile if it does not exist. The file should be opened only for write and all written data should be appended to the existing contents. If .logfile exists and cannot be written, the routine should return an error. If the file can be opened successfully, an entry of the following form is created:

op:time:data

where op is "read" or "write", time is the output value from the "time" system call, and data is the contents that were read or written by the call.

print buf into .logfile

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!