The pipe probably doesn't need to be closed since it is closed by
c_simple_http and the forked process stops while it is the only other
thing with that read-pipe-fd. However, it probably would be best to
close it so that during runtime all pipe fd's are closed after use.
from_xdg_mime_pipe[1],
STDOUT_FILENO);
+ // Close "read" side of pipe on "xdg-mime"'s side.
+ posix_spawn_file_actions_addclose(actions, from_xdg_mime_pipe[0]);
+
buf_size = 256;
buf = malloc(buf_size);
uint64_t buf_idx = 0;