summaryrefslogtreecommitdiffstats
path: root/file.c
AgeCommit message (Collapse)Author
2020-05-26Merge branch 'obsd-master'Thomas Adam
2020-05-26Pass the stdout file descriptor from the client as well as stdin and usenicm
them for control clients directly instead of passing everything via the client.
2020-05-08imsg.h needs uio.h, pointed out by deraadtnicm
2020-05-03Portable does not need sys/queue.h.Nicholas Marriott
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.