--- busybox-1.21.0/networking/slattach.c	2012-12-22 23:39:01.000000000 +0100
+++ src/networking/slattach.c	2023-09-08 11:35:24.238376217 +0200
@@ -159,13 +159,15 @@
 		OPT_h_watch  = 1 << 4,
 		OPT_m_nonraw = 1 << 5,
 		OPT_L_local  = 1 << 6,
-		OPT_F_noflow = 1 << 7
+		OPT_F_noflow = 1 << 7,
+		OPT_D_daemon = 1 << 8,
+		OPT_D_ignore_sigterm = 1 << 9,
 	};
 
 	INIT_G();
 
 	/* Parse command line options */
-	opt = getopt32(argv, "p:s:c:ehmLF", &proto, &baud_str, &extcmd);
+	opt = getopt32(argv, "p:s:c:ehmLFDT", &proto, &baud_str, &extcmd);
 	/*argc -= optind;*/
 	argv += optind;
 
@@ -234,11 +236,18 @@
 	if (opt & OPT_e_quit)
 		return 0;
 
+	if ((opt & OPT_D_daemon))
+		bb_daemonize(0);
+
+	if ((opt & OPT_D_ignore_sigterm))
+		signal(SIGTERM, SIG_IGN);
+
 	/* If we're not requested to watch, just keep descriptor open
 	 * until we are killed */
-	if (!(opt & OPT_h_watch))
+	if (!(opt & OPT_h_watch)) {
 		while (1)
 			sleep(24*60*60);
+	}
 
 	/* Watch line for hangup */
 	while (1) {
