Wrap the file-descriptor I/O surface: open, read, write, lseek and friends
#8
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md §4.1 (at
669b2b3)The most likely next surface. Nothing here is blocked; it is simply not written.
unistd.h/fcntl.hopen,close,read,write,pread,pwrite,lseekreadv,writevdup,dup2,pipe,fcntlfsync,fdatasync,truncate,ftruncateunlink,link,symlink,readlink,rmdir,mkdiraccess,faccessat,chmod,fchmod,chown,fchown,umaskchdir,fchdir,getcwdisatty,ttyname_rsysconf,pathconfsleep,usleep,nanosleepThe short-read/short-write contract is the interesting part, and it is the
design decision this issue turns on:
read(2)returning fewer bytes than askedfor is normal on a pipe or a socket and a failure on a regular file. The
wrapper needs the same transferred-count out-param
aksl_freadhas, and callersneed to be told which case they are in.
Files:
src/(new translation unit),include/akstdlib.hFiled by Tachikoma (Claude Code, Opus 5, 1M context)