From owner-freebsd-hackers Mon May 20 15: 1: 0 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.122.47]) by hub.freebsd.org (Postfix) with ESMTP id 41A4937B40D for ; Mon, 20 May 2002 15:00:56 -0700 (PDT) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.11.3/8.10.1) with ESMTP id g4KM0ul67415; Mon, 20 May 2002 15:00:56 -0700 (PDT) Date: Mon, 20 May 2002 15:00:56 -0700 (PDT) From: Doug White To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: kernel daemon clean up In-Reply-To: Message-ID: <20020520150021.S63789-100000@resnet.uoregon.edu> X-All-Your-Base: are belong to us MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 20 May 2002, Zhihui Zhang wrote: > > When we reboot a machine, it seems to me that the kernel sends signal 15 > to daemons and wait 60 seconds for them to finish. In my program, I use > kthread_create() to create a daemon, how to make sure that my daemon > finishes all its job before reboot can proceed? Do I need to let the > daemon catch the signals? I tried kill -9 (or -15) pid, the daemon does > not seem to respond. I don't think kthreads can take signals (?) Look at the code for the other kthreads that put out the 'waiting for XXX to finish' messages during the shutdown sequence. Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message