diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-05-20 13:01:43 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-05-20 13:08:01 -0400 |
commit | b08424dd960c2241ce14a61c0241c90f612cd6b4 (patch) | |
tree | 98604aff94318e476dfa15e34bd0f6ec76b7e729 /spawn.h | |
parent | db1888d8454db4ae39a87809956e5e44bd0a7407 (diff) | |
download | bfs-b08424dd960c2241ce14a61c0241c90f612cd6b4.tar.xz |
spawn: New bfs_spawn_addsetrlimit() action
Diffstat (limited to 'spawn.h')
-rw-r--r-- | spawn.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -21,6 +21,7 @@ #ifndef BFS_SPAWN_H #define BFS_SPAWN_H +#include <sys/resource.h> #include <sys/types.h> /** @@ -83,6 +84,13 @@ int bfs_spawn_adddup2(struct bfs_spawn *ctx, int oldfd, int newfd); int bfs_spawn_addfchdir(struct bfs_spawn *ctx, int fd); /** + * Add a setrlimit() action to a bfs_spawn() context. + * + * @return 0 on success, -1 on failure. + */ +int bfs_spawn_addsetrlimit(struct bfs_spawn *ctx, int resource, const struct rlimit *rl); + +/** * Spawn a new process. * * @param exe |