{"id":2226968,"url":"http://patchwork.ozlabs.org/api/patches/2226968/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/patch/177689989681.3821326.13273854197306243416.stgit@frogsfrogsfrogs/","project":{"id":8,"url":"http://patchwork.ozlabs.org/api/projects/8/?format=json","name":"Linux ext4 filesystem development","link_name":"linux-ext4","list_id":"linux-ext4.vger.kernel.org","list_email":"linux-ext4@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<177689989681.3821326.13273854197306243416.stgit@frogsfrogsfrogs>","list_archive_url":null,"date":"2026-04-22T23:25:40","name":"[08/10] fuse4fs: set proc title when in fuse service mode","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"769994c821f8c9f336a2c7e9adc6de3f8cf4e6a9","submitter":{"id":77032,"url":"http://patchwork.ozlabs.org/api/people/77032/?format=json","name":"Darrick J. Wong","email":"djwong@kernel.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-ext4/patch/177689989681.3821326.13273854197306243416.stgit@frogsfrogsfrogs/mbox/","series":[{"id":501127,"url":"http://patchwork.ozlabs.org/api/series/501127/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/list/?series=501127","date":"2026-04-22T23:23:47","name":"[01/10] libext2fs: make it possible to extract the fd from an IO manager","version":1,"mbox":"http://patchwork.ozlabs.org/series/501127/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2226968/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2226968/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <SRS0=ANxA=CV=vger.kernel.org=linux-ext4+bounces-16012-patchwork-incoming=ozlabs.org@ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-ext4@vger.kernel.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","patchwork-incoming@ozlabs.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=eVIm+7r2;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=anxa=cv=vger.kernel.org=linux-ext4+bounces-16012-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)","gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.234.253.10 arc.chain=subspace.kernel.org","gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org","gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=eVIm+7r2;\n\tdkim-atps=neutral","gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16012-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"eVIm+7r2\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g1FlQ6gb3z1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 09:28:18 +1000 (AEST)","from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g1FlQ6B3nz4wCM\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 09:28:18 +1000 (AEST)","by gandalf.ozlabs.org (Postfix)\n\tid 4g1FlQ66LGz4wHx; Thu, 23 Apr 2026 09:28:18 +1000 (AEST)","from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby gandalf.ozlabs.org (Postfix) with ESMTPS id 4g1FlM39mKz4wCM\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 23 Apr 2026 09:28:15 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 0E71630F2714\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 22 Apr 2026 23:25:42 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 6BD1839E19A;\n\tWed, 22 Apr 2026 23:25:41 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EAF41D6DA9;\n\tWed, 22 Apr 2026 23:25:41 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 08916C2BCAF;\n\tWed, 22 Apr 2026 23:25:41 +0000 (UTC)"],"ARC-Seal":["i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1776900498; cv=pass;\n\tb=whtp7isyiodSnyO+3r9dFuySeqDe/LMVP1ps3QOZHITOnOBmbww4HtAv3rChpvLTUY+fVfe9dRM3iBsEcClc96ksQ5o+SPVQmSwNd+bfIoFDvAXlwrObXC13DhxeJRSC0Ft0vyX1T7/IswyIRNzwpFmQfvTp3P2Z5+E6v+kYj1ZjwE91RnlzH4nJK2eeUTvFidG2x6MAlb3dpYvdhfWZZGAidMAfWmWeot03unjRrM4y5MROe6Qar1LrHzIfJbNDnvLZOMNRNcQ8tbs3LcfXOD4326fpp0Qr8VlNK2uov8LbhgOAuEDp0odqgLAbq5rht//8VzXwiaV+C+2VM4wXgw==","i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776900341; cv=none;\n b=rBee/cnoYVdPRDHOienXNxsBUBTJrTkmMBqQZQiOaOwpAzjdo9Cr5madCRRJfIsU6q4zn4g+7GvMIQljnQ785Y4eQfithDhOkSJNDJFa2oAYvO6UGJ+GDekrMcr2W6Jx2/+wd1YXu5+tDI4aMpUo/9rbjtI+VfBou9F1rAlY3N4="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1776900498; c=relaxed/relaxed;\n\tbh=rGMKi3mV5IePbK/2cf3HMBMMSSEBLq9hLT0tetXdJ+M=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=N/10b0Np3rufcUn5ZbxjAdBmU8igqvv+2d+/S1bundTH5zbEmt/ivsgpuO6YF9dkP+gKuF8uVMkMCuNm2drllFwu7pPoLK9YCgwGkyOWo/+ZqDu5+YGXecdv2DcDwB8kJZx+Yqvcl1bapqmBUSyIZItH5OsuzAoMhCEzC18BvARtW/HGtngwnoaw2oNBJueVYY5uHCXl6ArAk5lGk8BkxlEK0sqJ5n87o3Y5fyEyR+Z9fCalOeEven8gHI1SkGnry5bHtvDx+bqG6Mf5lrE5qaTwVhk5EdiCdFTcvNRWCS15/Mngd+pdLwmvXyw9/1P/2XVvCqFaUo5PXC/W8RstlA==","i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776900341; c=relaxed/simple;\n\tbh=C0S1uIjDoXK6qpsV8yIaqvtfsqzZv6kTvUc1UvYWPcU=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=SN9oD4qLXNMJFx1kISjI8PLv2wUJBKQ7GGdlY8cYMKyhE4RPreqPM/jHe0k2tVQl+1cekXUdi5WOVmP6zniOKaB/UY4ilzY0wbu/s9Y1WXd6MXHlBJhvT5Zbqjdmv3GJs5bC1DFgLUjzfAOZGfWGg9ZdO/ish7edShEATBy9KnI="],"ARC-Authentication-Results":["i=2; gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=eVIm+7r2; dkim-atps=neutral;\n spf=pass (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16012-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org","i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=eVIm+7r2; arc=none smtp.client-ip=10.30.226.201"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1776900341;\n\tbh=C0S1uIjDoXK6qpsV8yIaqvtfsqzZv6kTvUc1UvYWPcU=;\n\th=Date:Subject:From:To:Cc:In-Reply-To:References:From;\n\tb=eVIm+7r2BMQ7GNPj0TOmEEHyGu3Xr6Q36gycGh0DN19ELdSk8h4yjl4DOiP+p1PTB\n\t 81imfkHZ5nO+3fI71fautFrLS71AOTJFH0uJE0y85Fvzn60m3YxYqKltDgIXpUmzS0\n\t CV0zGjhWT5nR6LRvYs34bh5K6qXg85Om/OZcaCP+XgWxGdECybHWb2PNo1/s40kalT\n\t i2bBjdR2rJfkDOH9slVkkasYJQtcOzwDSBCtjRdAPBqm8CkwJChVJYWUmxxqoKzOVH\n\t K8J1RzjJUFdyPQ8LvLIOn91r6Yoid5S++h6G4e2WtEcTIralaiknKCo/pUFUx4WCWH\n\t lIP17yVlB7EUQ==","Date":"Wed, 22 Apr 2026 16:25:40 -0700","Subject":"[PATCH 08/10] fuse4fs: set proc title when in fuse service mode","From":"\"Darrick J. Wong\" <djwong@kernel.org>","To":"tytso@mit.edu","Cc":"linux-fsdevel@vger.kernel.org, fuse-devel@lists.linux.dev,\n linux-ext4@vger.kernel.org, neal@gompa.dev, joannelkoong@gmail.com,\n miklos@szeredi.hu, bernd@bsbernd.com","Message-ID":"<177689989681.3821326.13273854197306243416.stgit@frogsfrogsfrogs>","In-Reply-To":"<177689989498.3821326.15497525132012299039.stgit@frogsfrogsfrogs>","References":"<177689989498.3821326.15497525132012299039.stgit@frogsfrogsfrogs>","Precedence":"bulk","X-Mailing-List":"linux-ext4@vger.kernel.org","List-Id":"<linux-ext4.vger.kernel.org>","List-Subscribe":"<mailto:linux-ext4+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-ext4+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","X-Spam-Status":"No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"},"content":"From: Darrick J. Wong <djwong@kernel.org>\n\nWhen in fuse service mode, set the process title so that we can identify\nfuse servers by mount arguments.  When the service ends, amend the title\nagain to say that we're cleaning up.  This is done to make ps aux a bit\nmore communicative as to what is going on.\n\nSigned-off-by: \"Darrick J. Wong\" <djwong@kernel.org>\n---\n configure           |  109 +++++++++++++++++++++++++++++++++++++++++++++++++++\n configure.ac        |   13 ++++++\n fuse4fs/Makefile.in |    2 -\n fuse4fs/fuse4fs.c   |   47 ++++++++++++++++++++++\n lib/config.h.in     |    6 +++\n 5 files changed, 176 insertions(+), 1 deletion(-)","diff":"diff --git a/configure b/configure\nindex 0d49ec854a92cf..80aad505da550c 100755\n--- a/configure\n+++ b/configure\n@@ -696,6 +696,7 @@ gcc_ranlib\n gcc_ar\n UNI_DIFF_OPTS\n SEM_INIT_LIB\n+LIBBSD_LIB\n FUSE4FS_CMT\n FUSE2FS_CMT\n fuse_service_socket_perms\n@@ -15014,6 +15015,114 @@ printf \"%s\\n\" \"#define HAVE_FUSE_CACHE_READDIR 1\" >>confdefs.h\n \n fi\n \n+{ printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lbsd\" >&5\n+printf %s \"checking for setproctitle in -lbsd... \" >&6; }\n+if test ${ac_cv_lib_bsd_setproctitle+y}\n+then :\n+  printf %s \"(cached) \" >&6\n+else case e in #(\n+  e) ac_check_lib_save_LIBS=$LIBS\n+LIBS=\"-lbsd  $LIBS\"\n+cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n+/* end confdefs.h.  */\n+\n+/* Override any GCC internal prototype to avoid an error.\n+   Use char because int might match the return type of a GCC\n+   builtin and then its argument prototype would still apply.\n+   The 'extern \"C\"' is for builds by C++ compilers;\n+   although this is not generally supported in C code supporting it here\n+   has little cost and some practical benefit (sr 110532).  */\n+#ifdef __cplusplus\n+extern \"C\"\n+#endif\n+char setproctitle (void);\n+int\n+main (void)\n+{\n+return setproctitle ();\n+  ;\n+  return 0;\n+}\n+_ACEOF\n+if ac_fn_c_try_link \"$LINENO\"\n+then :\n+  ac_cv_lib_bsd_setproctitle=yes\n+else case e in #(\n+  e) ac_cv_lib_bsd_setproctitle=no ;;\n+esac\n+fi\n+rm -f core conftest.err conftest.$ac_objext conftest.beam \\\n+    conftest$ac_exeext conftest.$ac_ext\n+LIBS=$ac_check_lib_save_LIBS ;;\n+esac\n+fi\n+{ printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_setproctitle\" >&5\n+printf \"%s\\n\" \"$ac_cv_lib_bsd_setproctitle\" >&6; }\n+if test \"x$ac_cv_lib_bsd_setproctitle\" = xyes\n+then :\n+  LIBBSD_LIB=-lbsd\n+fi\n+\n+{ printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: checking for setproctitle_init in -lbsd\" >&5\n+printf %s \"checking for setproctitle_init in -lbsd... \" >&6; }\n+if test ${ac_cv_lib_bsd_setproctitle_init+y}\n+then :\n+  printf %s \"(cached) \" >&6\n+else case e in #(\n+  e) ac_check_lib_save_LIBS=$LIBS\n+LIBS=\"-lbsd  $LIBS\"\n+cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n+/* end confdefs.h.  */\n+\n+/* Override any GCC internal prototype to avoid an error.\n+   Use char because int might match the return type of a GCC\n+   builtin and then its argument prototype would still apply.\n+   The 'extern \"C\"' is for builds by C++ compilers;\n+   although this is not generally supported in C code supporting it here\n+   has little cost and some practical benefit (sr 110532).  */\n+#ifdef __cplusplus\n+extern \"C\"\n+#endif\n+char setproctitle_init (void);\n+int\n+main (void)\n+{\n+return setproctitle_init ();\n+  ;\n+  return 0;\n+}\n+_ACEOF\n+if ac_fn_c_try_link \"$LINENO\"\n+then :\n+  ac_cv_lib_bsd_setproctitle_init=yes\n+else case e in #(\n+  e) ac_cv_lib_bsd_setproctitle_init=no ;;\n+esac\n+fi\n+rm -f core conftest.err conftest.$ac_objext conftest.beam \\\n+    conftest$ac_exeext conftest.$ac_ext\n+LIBS=$ac_check_lib_save_LIBS ;;\n+esac\n+fi\n+{ printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_setproctitle_init\" >&5\n+printf \"%s\\n\" \"$ac_cv_lib_bsd_setproctitle_init\" >&6; }\n+if test \"x$ac_cv_lib_bsd_setproctitle_init\" = xyes\n+then :\n+  LIBBSD_LIB=-lbsd\n+fi\n+\n+\n+if test \"$ac_cv_lib_bsd_setproctitle\" = yes ; then\n+\n+printf \"%s\\n\" \"#define HAVE_SETPROCTITLE 1\" >>confdefs.h\n+\n+fi\n+if test \"$ac_cv_lib_bsd_setproctitle_init\" = yes ; then\n+\n+printf \"%s\\n\" \"#define HAVE_SETPROCTITLE_INIT 1\" >>confdefs.h\n+\n+fi\n+\n { printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: checking for PR_SET_IO_FLUSHER\" >&5\n printf %s \"checking for PR_SET_IO_FLUSHER... \" >&6; }\n cat confdefs.h - <<_ACEOF >conftest.$ac_ext\ndiff --git a/configure.ac b/configure.ac\nindex 4b66296764ec86..63a5cd697a6dde 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1619,6 +1619,19 @@ then\n \t\t  [Define to 1 if fuse supports cache_readdir])\n fi\n \n+dnl\n+dnl see if setproctitle exists\n+dnl\n+AC_CHECK_LIB(bsd, setproctitle, [LIBBSD_LIB=-lbsd])\n+AC_CHECK_LIB(bsd, setproctitle_init, [LIBBSD_LIB=-lbsd])\n+AC_SUBST(LIBBSD_LIB)\n+if test \"$ac_cv_lib_bsd_setproctitle\" = yes ; then\n+\tAC_DEFINE(HAVE_SETPROCTITLE, 1, [Define to 1 if setproctitle present in libbsd])\n+fi\n+if test \"$ac_cv_lib_bsd_setproctitle_init\" = yes ; then\n+\tAC_DEFINE(HAVE_SETPROCTITLE_INIT, 1, [Define to 1 if setproctitle_init present in libbsd])\n+fi\n+\n dnl\n dnl see if PR_SET_IO_FLUSHER exists\n dnl\ndiff --git a/fuse4fs/Makefile.in b/fuse4fs/Makefile.in\nindex 8de3fff338584c..97b2da3af9bc0b 100644\n--- a/fuse4fs/Makefile.in\n+++ b/fuse4fs/Makefile.in\n@@ -76,7 +76,7 @@ fuse4fs: $(FUSE4FS_OBJS) $(DEPLIBS) $(DEPLIBBLKID) $(DEPLIBUUID) \\\n \t$(E) \"\tLD $@\"\n \t$(Q) $(CC) $(ALL_LDFLAGS) -o fuse4fs $(FUSE4FS_OBJS) $(LIBS) \\\n \t\t$(LIBFUSE) $(LIBBLKID) $(LIBUUID) $(LIBEXT2FS) $(LIBINTL) \\\n-\t\t$(CLOCK_GETTIME_LIB) $(SYSLIBS) $(LIBS_E2P)\n+\t\t$(CLOCK_GETTIME_LIB) $(SYSLIBS) $(LIBS_E2P) @LIBBSD_LIB@\n \n %.socket: %.socket.in $(DEP_SUBSTITUTE)\n \t$(E) \"\tSUBST $@\"\ndiff --git a/fuse4fs/fuse4fs.c b/fuse4fs/fuse4fs.c\nindex 47cac88c46cea9..bf7c8ef9102a7a 100644\n--- a/fuse4fs/fuse4fs.c\n+++ b/fuse4fs/fuse4fs.c\n@@ -45,6 +45,9 @@\n #ifdef HAVE_FUSE4FS_SERVICE\n # include <sys/mount.h>\n # include <fuse_service.h>\n+# ifdef HAVE_SETPROCTITLE\n+#  include <bsd/unistd.h>\n+# endif\n #endif\n #ifdef __SET_FOB_FOR_FUSE\n # undef _FILE_OFFSET_BITS\n@@ -277,6 +280,9 @@ struct fuse4fs {\n \tstruct cache inodes;\n #ifdef HAVE_FUSE4FS_SERVICE\n \tstruct fuse_service *service;\n+# ifdef HAVE_SETPROCTITLE\n+\tchar *svc_cmdline;\n+# endif\n \tint bdev_fd;\n #endif\n };\n@@ -1252,6 +1258,35 @@ static errcode_t fuse4fs_check_support(struct fuse4fs *ff)\n \treturn 0;\n }\n \n+#if defined(HAVE_FUSE4FS_SERVICE) && defined(HAVE_SETPROCTITLE)\n+static void fuse4fs_service_set_proc_cmdline(struct fuse4fs *ff, int argc,\n+\t\t\t\t\t     char *argv[],\n+\t\t\t\t\t     struct fuse_args *args)\n+{\n+#ifdef HAVE_SETPROCTITLE_INIT\n+\tsetproctitle_init(argc, argv, environ);\n+#endif\n+\n+\tff->svc_cmdline = fuse_service_cmdline(argc, argv, args);\n+\tif (!ff->svc_cmdline)\n+\t\treturn;\n+\n+\tsetproctitle(\"-%s\", ff->svc_cmdline);\n+}\n+\n+static void fuse4fs_service_finish_proc_cmdline(struct fuse4fs *ff)\n+{\n+\tif (!ff->svc_cmdline)\n+\t\treturn;\n+\n+\tsetproctitle(\"-%s [cleaning up]\", ff->svc_cmdline);\n+\tfree(ff->svc_cmdline);\n+}\n+#else\n+# define fuse4fs_service_set_proc_cmdline(...)\t\t((void)0)\n+# define fuse4fs_service_finish_proc_cmdline(...)\t((void)0)\n+#endif\n+\n #ifdef HAVE_FUSE4FS_SERVICE\n static int fuse4fs_service_connect(struct fuse4fs *ff, struct fuse_args *args)\n {\n@@ -1285,6 +1320,8 @@ static int fuse4fs_service_exit(struct fuse4fs *ff, int exitcode)\n \tif (!fuse4fs_is_service(ff))\n \t\treturn exitcode;\n \n+\tfuse4fs_service_finish_proc_cmdline(ff);\n+\n \tfuse_service_send_goodbye(ff->service, exitcode);\n \tfuse_service_release(ff->service);\n \tclose(ff->bdev_fd);\n@@ -6353,6 +6390,16 @@ int main(int argc, char *argv[])\n \t\tgoto out_exit;\n \t}\n \n+\t/*\n+\t * For fuse services, make the /proc title include the arguments that\n+\t * we got from the mount helper.  Do this after parsing argc/argv\n+\t * because that may overwrite the argv area.  Note that the procfs\n+\t * listing might not reflect the options that actually get enabled,\n+\t * just like regular fuse4fs.\n+\t */\n+\tif (fuse4fs_is_service(&fctx))\n+\t\tfuse4fs_service_set_proc_cmdline(&fctx, argc, argv, &args);\n+\n \t/* /dev/sda -> sda for reporting */\n \tfctx.shortdev = strrchr(fctx.device, '/');\n \tif (fctx.shortdev)\ndiff --git a/lib/config.h.in b/lib/config.h.in\nindex 3aa0511a329b17..2c25632188e4f3 100644\n--- a/lib/config.h.in\n+++ b/lib/config.h.in\n@@ -376,6 +376,12 @@\n /* Define to 1 if you have the 'setmntent' function. */\n #undef HAVE_SETMNTENT\n \n+/* Define to 1 if setproctitle present in libbsd */\n+#undef HAVE_SETPROCTITLE\n+\n+/* Define to 1 if setproctitle_init present in libbsd */\n+#undef HAVE_SETPROCTITLE_INIT\n+\n /* Define to 1 if you have the 'setresgid' function. */\n #undef HAVE_SETRESGID\n \n","prefixes":["08/10"]}