diff options
author | Mattias Andrée <maandree@kth.se> | 2016-07-11 14:58:50 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-07-11 14:58:50 +0200 |
commit | 0fd708b8f1ffd099d092c02af28c79101ca58524 (patch) | |
tree | 2c06414416b4a7bf7e42bcce0f6dbedabbe57d64 /src/util.h | |
parent | Signal the spawner when the service is initialised enough (diff) | |
download | coopgammad-0fd708b8f1ffd099d092c02af28c79101ca58524.tar.gz coopgammad-0fd708b8f1ffd099d092c02af28c79101ca58524.tar.bz2 coopgammad-0fd708b8f1ffd099d092c02af28c79101ca58524.tar.xz |
Place in background unless -f
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/util.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -40,3 +40,15 @@ void* memdup(const void* src, size_t n); */ void* nread(int fd, size_t* n); + +/** + * Duplicate a file descriptor an make sure + * the new file descriptor's index as a + * specified minimum value + * + * @param fd The file descriptor + * @param atleast The least acceptable new file descriptor + * @return The new file descriptor, -1 on error + */ +int dup2atleast(int fd, int atleast); + |