packages feed

nova-nix-0.11.0.0 / cbits / nn_hangup.h

/* Waiting for a daemon's client to hang up, as upstream's daemon watches * each connection while it serves it, so the work for a client that has * gone can be stopped.  Windows compiles a stub that fails, because the * cabal c-sources entry is unconditional; the daemon there serves a named * pipe (Nix.Daemon.Pipe), which does not use this wait. */#ifndef NN_HANGUP_H#define NN_HANGUP_H/* Block until the peer of the connected socket watch_fd hangs up, or until * every write end of the pipe whose read end is notify_fd is closed. * Returns 1 for the hangup, 0 for the pipe, and -1 with errno set when the * wait fails or either descriptor is not open.  On macOS the wait is a * kqueue read filter's end-of-file, and elsewhere poll's POLLHUP, as * upstream waits on each. */int nn_wait_hangup(int watch_fd, int notify_fd);#endif