From b3a20a96eb2b91a5b0b8a8fb506e20a2fb50ebe8 Mon Sep 17 00:00:00 2001
From: Russ Cox <rsc@swtch.com>
Date: Wed, 30 Dec 2020 00:10:11 -0500
Subject: libthread: add threadmaybackground

Programs that want to background themselves now need
to define threadmaybackground returning 1.
This avoids a confusing (to people and debuggers)
extra parent process for all the threaded programs
that will never want to background themselves.
---
 src/cmd/auth/factotum/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/cmd/auth/factotum')

diff --git a/src/cmd/auth/factotum/main.c b/src/cmd/auth/factotum/main.c
index b3ace12c..6dfc2a40 100644
--- a/src/cmd/auth/factotum/main.c
+++ b/src/cmd/auth/factotum/main.c
@@ -20,6 +20,12 @@ usage(void)
 	threadexitsall("usage");
 }
 
+int
+threadmaybackground(void)
+{
+	return 1;
+}
+
 void
 threadmain(int argc, char *argv[])
 {
-- 
cgit v1.2.3