mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 00:35:23 +00:00
util: add a function for executing an extrenal tools (v2)
For executing an external tools we need to block a SIGCHLD and to juggle file descriptors. SIGCHLD is blocked for getting an exit code. A problem with file descriptors can be if we want to set 2 to STDIN, 1 to STDERR, 0 to STDOUT for example. v2: use helpers reopen_fd_as and move_img_fd Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
af02c2698f
commit
cd2be93ba4
@@ -325,4 +325,6 @@ extern void *shmalloc(size_t bytes);
|
||||
extern void shfree_last(void *ptr);
|
||||
extern int run_scripts(char *action);
|
||||
|
||||
extern int cr_system(int in, int out, int err, char *cmd, char *const argv[]);
|
||||
|
||||
#endif /* UTIL_H_ */
|
||||
|
Reference in New Issue
Block a user