From owner-p4-projects@FreeBSD.ORG Mon Jul 17 16:25:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E5F3A16A594; Mon, 17 Jul 2006 16:25:57 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A64F616A580 for ; Mon, 17 Jul 2006 16:25:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA8B943D5D for ; Mon, 17 Jul 2006 16:25:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6HGPik1038606; Mon, 17 Jul 2006 12:25:55 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Divacky Roman Date: Mon, 17 Jul 2006 11:50:22 -0400 User-Agent: KMail/1.9.1 References: <200607150905.k6F959IT031112@repoman.freebsd.org> <200607151003.28710.jhb@freebsd.org> <20060715143502.GA77297@stud.fit.vutbr.cz> In-Reply-To: <20060715143502.GA77297@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607171150.22668.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 17 Jul 2006 12:25:55 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1600/Sat Jul 15 11:03:46 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 101643 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2006 16:25:58 -0000 On Saturday 15 July 2006 10:35, Divacky Roman wrote: > On Sat, Jul 15, 2006 at 10:03:28AM -0400, John Baldwin wrote: > > On Saturday 15 July 2006 05:05, Roman Divacky wrote: > > > http://perforce.freebsd.org/chv.cgi?CH=101643 > > > > > > Change 101643 by rdivacky@rdivacky_witten on 2006/07/15 09:04:22 > > > > > > Several things at once: > > > > > > o Change process_exit and process_exec function handlers prototype > > > to include struct image_params arg. > > > > Why did you add it to process_exit()? exit() doesn't have an imgp to > > pass, so this doesn't make sense. If you are doing it so you can use > > the same function for both, then use a wrapper in the exit() case or some > > such. > > because most users of process_exec eventhandler use the same function both > for process_exit and process_exec. I didnt know how to solve that otherwise. > in the process_exit case I pass in NULL and I change all the other users to > > foo(void *arg, struct proc *p, struct image_params *imgp __unused) > > if its not ok tell me how to change that I don't think it's clean design wise. I think you should fix all the other places to register a different function for the exec/exit cases. One can just be a wrapper for the other (e.g. have the exec one just ignore the imgp and call the exit one). -- John Baldwin