diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index 1db79fb170e4..89fea053d598 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -926,6 +926,7 @@ libzfs_run_process_impl(const char *path, char *argv[], char *env[], int flags, pid = fork(); if (pid == 0) { /* Child process */ + setpgid(0, 0); devnull_fd = open("/dev/null", O_WRONLY | O_CLOEXEC); if (devnull_fd < 0)