From: Daniel Golle Date: Thu, 15 Jul 2021 14:49:34 +0000 (+0100) Subject: blockd: move to its own POSIX process group X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cdc9939b071427cf2b35134481df27b4bd76dbfc;p=project%2Ffstools.git 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 --- 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();