Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269296AbUJFPz3 (ORCPT ); Wed, 6 Oct 2004 11:55:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269316AbUJFPz3 (ORCPT ); Wed, 6 Oct 2004 11:55:29 -0400 Received: from mustang.oldcity.dca.net ([216.158.38.3]:38799 "HELO mustang.oldcity.dca.net") by vger.kernel.org with SMTP id S269296AbUJFPzQ (ORCPT ); Wed, 6 Oct 2004 11:55:16 -0400 Subject: Re: Proper use of daemonize()? From: Lee Revell To: Stuart MacDonald Cc: "'Linux Kernel Mailing List'" In-Reply-To: <030601c4abb7$af573770$294b82ce@stuartm> References: <030601c4abb7$af573770$294b82ce@stuartm> Content-Type: text/plain Message-Id: <1097078113.1903.61.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 06 Oct 2004 11:55:14 -0400 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 923 Lines: 25 On Wed, 2004-10-06 at 11:18, Stuart MacDonald wrote: > I've been looking at the kernel threads that use daemonize() and have > some questions about the proper use of this call: > > 1: Some threads use the lock_kernel() calls around the daemonize() > call. Is this necessary? It's only necessary if you can't be bothered to do proper locking. Probably that code is old and someone did not have time to implement correct locking to make it work on SMP so just threw lock/unlock kernel around it. > I thought the BKL was phasing out. > Well, it's not going to phase itself out ;-) But, patches that introduce new uses of the BKL will almost certainly go to /dev/null. Lee - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/