Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 21 Nov 2001 05:13:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 21 Nov 2001 05:12:57 -0500 Received: from artax.karlin.mff.cuni.cz ([195.113.31.125]:8201 "EHLO artax.karlin.mff.cuni.cz") by vger.kernel.org with ESMTP id ; Wed, 21 Nov 2001 05:12:44 -0500 Date: Wed, 21 Nov 2001 11:12:43 +0100 From: Jan Hudec To: linux-kernel@vger.kernel.org Subject: Re: copy to user Message-ID: <20011121111243.B2196@artax.karlin.mff.cuni.cz> Mail-Followup-To: Jan Hudec , linux-kernel@vger.kernel.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mathijs@knoware.nl on Wed, Nov 21, 2001 at 09:43:25AM +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > > I suppose now you can understand why SIGSTOP won't work. Hope you can help > > me :) > > how about making a signal handler for SIGUSR1 that checks a global variable and > loops. an other signal handler for SIGUSR2 to clear the variable so the SIGUSR1 > handler can exit. > > All in user space. (to delay execution kill -USR1 $pid, to continue: kill -USR2 > $pid) The same is possible within the kernel too! Add default handler to some unused signals (there are more user-defineable signals than SIGUSR[12] and noone cares to install handler for them) to do the loop in kernel. Just make sure, that you call shedule() from time to time in that loop, because in kernel you can't be preempted as you would in user-space. -------------------------------------------------------------------------------- - Jan Hudec `Bulb' - 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/