Mercurial > public > mercurial-scm > hg
diff contrib/chg/util.h @ 28855:f5764e177bbe
chg: extract the logic of setting FD_CLOEXEC to a utility function
Setting FD_CLOEXEC is useful for other fds such like lockfd and sockdirfd,
move the logic from hgc_open to util.
author | Jun Wu <quark@fb.com> |
---|---|
date | Mon, 11 Apr 2016 00:17:17 +0100 |
parents | ddef14468952 |
children | 009cc6c89d0f |
line wrap: on
line diff
--- a/contrib/chg/util.h Sun Apr 10 03:14:32 2016 +0100 +++ b/contrib/chg/util.h Mon Apr 11 00:17:17 2016 +0100 @@ -24,6 +24,7 @@ void debugmsg(const char *fmt, ...) PRINTF_FORMAT_; void fchdirx(int dirfd); +void fsetcloexec(int fd); void *mallocx(size_t size); void *reallocx(void *ptr, size_t size);