X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=secnet.h;h=f0ab80b8cde32ab4214577205b7ae37b7a88fa18;hb=99fb186749bdb8753bad96da0b3b3ddd5284b1eb;hp=647c94082b7b2d0afded05e40fa9cb7f6e79c219;hpb=1a448682f9a56b3e33e24fc07767a07e40feaec7;p=secnet.git diff --git a/secnet.h b/secnet.h index 647c940..f0ab80b 100644 --- a/secnet.h +++ b/secnet.h @@ -9,6 +9,8 @@ #include #include #include +#include +#include #include #include #include @@ -136,6 +138,9 @@ extern char *safe_strdup(const char *string, const char *message); extern void *safe_malloc(size_t size, const char *message); extern void *safe_malloc_ary(size_t size, size_t count, const char *message); +void setcloexec(int fd); /* cannot fail */ +void pipe_cloexec(int fd[2]); /* pipe(), setcloexec() twice; cannot fail */ + extern int sys_cmd(const char *file, const char *argc, ...); extern uint64_t now_global; @@ -499,7 +504,7 @@ struct buffer_if { uint8_t *base; uint8_t *start; int32_t size; /* Size of buffer contents */ - int32_t len; /* Total length allocated at base */ + int32_t alloclen; /* Total length allocated at base */ }; /***** LOG functions *****/