pwrite(fd, buf, 1, 10000);
Note that even though the file size is set to 1000 bytes
Was the fourth argument to pwrite() intended to be 1000, not 10000? (After which the file size should be 1001 bytes, not 1000.)
Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds