mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
repart: load libraries before forking off child
This commit is contained in:
@@ -16,6 +16,7 @@ executables += [
|
||||
'dependencies' : [
|
||||
libblkid_cflags,
|
||||
libfdisk,
|
||||
libmount_cflags,
|
||||
libopenssl,
|
||||
threads,
|
||||
],
|
||||
@@ -35,6 +36,7 @@ executables += [
|
||||
'dependencies' : [
|
||||
libblkid_cflags,
|
||||
libfdisk,
|
||||
libmount_cflags,
|
||||
libopenssl,
|
||||
threads,
|
||||
],
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "initrd-util.h"
|
||||
#include "io-util.h"
|
||||
#include "json-util.h"
|
||||
#include "libmount-util.h"
|
||||
#include "list.h"
|
||||
#include "loop-util.h"
|
||||
#include "main-func.h"
|
||||
@@ -6616,6 +6617,8 @@ static int partition_populate_filesystem(Context *context, Partition *p, const c
|
||||
* appear in the host namespace. Hence we fork a child that has its own file system namespace and
|
||||
* detached mount propagation. */
|
||||
|
||||
(void) dlopen_libmount();
|
||||
|
||||
r = safe_fork("(sd-copy)", FORK_DEATHSIG_SIGTERM|FORK_LOG|FORK_WAIT|FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE, NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user