From owner-freebsd-questions@FreeBSD.ORG Wed Oct 12 19:41:15 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AAEF16A41F for ; Wed, 12 Oct 2005 19:41:15 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D26E43D48 for ; Wed, 12 Oct 2005 19:41:14 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: by wproxy.gmail.com with SMTP id 71so71862wra for ; Wed, 12 Oct 2005 12:41:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=Eo2zWrmAYvgo4zfKzU8Z3KgOij/kZ6b7Re3IJx/D/M8LnsxD3ysvrsEKqQG8NrF5BWAoG7Ki6mxC6j4+P8WE64kPnEBKu9ak++LgcgRpC/GTUBMxAuq9GPWB2xjWqhl4dOTYPgnms2aaSyddYU1uTt+I0gq1roPuIn1uWV69SuU= Received: by 10.54.112.17 with SMTP id k17mr266064wrc; Wed, 12 Oct 2005 12:41:14 -0700 (PDT) Received: from ?192.168.1.10? ( [71.102.45.234]) by mx.gmail.com with ESMTP id 38sm6107334wrl.2005.10.12.12.41.12; Wed, 12 Oct 2005 12:41:13 -0700 (PDT) From: "Michael C. Shultz" To: Michael Lednev , freebsd-questions@freebsd.org, hackers@freebsd.org Date: Wed, 12 Oct 2005 12:42:53 -0700 User-Agent: KMail/1.8.2 References: <629544090.20051009185315@reaper.hn.org> In-Reply-To: <629544090.20051009185315@reaper.hn.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510121242.55482.ringworm01@gmail.com> Cc: Subject: Re: portmanager X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2005 19:41:15 -0000 On Sunday 09 October 2005 07:53, Michael Lednev wrote: > Hello, freebsd-questions. > > anyone tried to run portmanager from crontab? as for me it just > coredumps, what am i doing wrong? its simply 0 0 * * * portmanager -s I'm not sure how to fix it but I've found where portmanager crashes when run from cron, the code is: if( !strncmp( getenv("TERM"), "xterm", 5 ) && isatty(fileno(stdout)) ) { stringSize = strlen( id ) + 1 + strlen( VERSION ) + 1; xtermTitle = malloc( stringSize ); xtermTitle[0] = 0; strcat( xtermTitle, id ); strcat( xtermTitle, " " ); strcat( xtermTitle, VERSION ); printf( "%c]0;%s%c", '\033', xtermTitle, '\007' ); free( xtermTitle ); } This is used to put information in the xterm title screen while portmanager is running, I don't know enough about cron to have a clue how to fix this except to remove it and I don't want to do that. Anyone have any ideas? This particualr code snippet is from portmanager/portmanager.c around line 137.... -Mike ps. I've cross posted this to freebsd-hackers because it is a coding problem, so you may want to remove freebsd-questions from any replies. .