summaryrefslogtreecommitdiffstats
path: root/file.c
AgeCommit message (Collapse)Author
2019-12-16Remove imsg.h.Nicholas Marriott
2019-12-16If /dev/fd/X is a symlink and realpath() expands symlinks, /dev/fd/Xnicm
ends up pointing to the wrong place before it is passed to the client. The path is only used internally so there is no real need for realpath(), remove it and move the get_path function to file.c where all the callers are.
2019-12-16Need to include message size in the maximum buffer calculation.nicm
2019-12-16Instead of using large buffers in imsgs, add the data or path onto the end.nicm
2019-12-12Do not check if client is dead if it is NULL.nicm
2019-12-12Rewrite the code for reading and writing files. Now, if the client isnicm
not attached, the server process asks it to open the file, similar to how works for stdin, stdout, stderr. This makes special files like /dev/fd/X work (used by some shells). stdin, stdout and stderr and control mode are now just special cases of the same mechanism. This will also make it easier to use for other commands that read files such as source-file.