I am trying to write a program to copy files using aync I/O in unix.
I have written this code :
The contents of source file are getting copied to the destination but some junk is also appended with it. I suspect the problem is because of the buffers used for writing. The extra space in the buffers have junk which is written to the file. Can anyone suggest a fix for this?
int main(int argc,char *argv)
struct iovec iov;
fd=open(argv,O_RDWR | O_CREAT);