summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-07-15 15:49:34 +0100
committerDaniel Golle <daniel@makrotopia.org>2021-07-15 17:54:04 +0100
commitcdc9939b071427cf2b35134481df27b4bd76dbfc (patch)
tree535195c276b93fdd3d9257689bc9e2311a88db41
parent3386b6ba812e3dfe6e438a514d377a68800989f3 (diff)
downloadfstools-cdc9939b071427cf2b35134481df27b4bd76dbfc.tar.gz
blockd: move to its own POSIX process group
Not to be confused with cgroups, there are also POSIX process groups. They do matter when it comes to autofs, as all requests coming from the process group of the automounter itself will be ignored. Hence, if blockd runs in the same process group as init and all services, requests from services will be ignored. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--blockd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/blockd.c b/blockd.c
index 0520009..58b33e3 100644
--- a/blockd.c
+++ b/blockd.c
@@ -635,6 +635,9 @@ struct uloop_timeout startup = {
int main(int argc, char **argv)
{
+ /* make sure blockd is in it's own POSIX process group */
+ setpgrp();
+
ulog_open(ULOG_SYSLOG | ULOG_STDIO, LOG_DAEMON, "blockd");
uloop_init();