From obrien@NUXI.org  Wed Apr 20 17:33:05 2011
Return-Path: <obrien@NUXI.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3A16E106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 20 Apr 2011 17:33:05 +0000 (UTC)
	(envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id F3DDB8FC1C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 20 Apr 2011 17:33:04 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id p3KHX443082073
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 20 Apr 2011 10:33:04 -0700 (PDT)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id p3KHX3Cm082072;
	Wed, 20 Apr 2011 10:33:03 -0700 (PDT)
	(envelope-from obrien)
Message-Id: <201104201733.p3KHX3Cm082072@dragon.nuxi.org>
Date: Wed, 20 Apr 2011 10:33:03 -0700 (PDT)
From: "David O'Brien" <obrien@freebsd.org>
Reply-To: "David O'Brien" <obrien@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Omnitty does not work with "Sun Function-Keys" Xterm
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         156521
>Category:       ports
>Synopsis:       net/omnitty does not work with "Sun Function-Keys" Xterm
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    rafan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 20 17:40:07 UTC 2011
>Closed-Date:    Fri Apr 22 15:17:34 UTC 2011
>Last-Modified:  Fri Apr 22 15:20:09 UTC 2011
>Originator:     David O'Brien
>Release:        FreeBSD 9.0-CURRENT i386
>Organization:
The FreeBSD Project
>Environment:
System: FreeBSD dragon.NUXI.org 9.0-CURRENT FreeBSD 9.0-CURRENT #662 r218815:218845M: Tue Feb 22 00:13:31 PST 2011 rootk@dragon.NUXI.org:/sys/i386/compile/DRAGON i386

===================================================================
File: Makefile         	Status: Up-to-date
   Working file:	Makefile
   Working revision:	1.7	Sat Aug 22 12:43:22 2009
   Repository revision:	1.7	/home/ncvs/ports/net/omnitty/Makefile,v
===================================================================
File: patch-main.c     	Status: Up-to-date
   Working file:	files/patch-main.c
   Working revision:	1.1	Wed Feb 20 02:06:11 2008
   Repository revision:	1.1	/home/ncvs/ports/net/omnitty/files/patch-main.c,v
===================================================================

>Description:
	If one has "XTerm.sunFunctionKeys: True" in ~/.Xdefaults, then
	Omnitty will not recognize any function-key press.

>How-To-Repeat:
	Try it.
>Fix:

Updated patch-main.c:

--- main.c.orig	2005-10-25 15:08:25.000000000 -0700
+++ main.c	2011-04-20 09:21:32.000000000 -0700
@@ -89,6 +89,13 @@ void curses_init() {
    define_key("\e[18~", KEY_F(7)); define_key("\e[19~", KEY_F(8));
    define_key("\e[20~", KEY_F(9)); define_key("\e[21~", KEY_F(10));
 
+   /* If "Sun Function-Keys" is enabled in your Xterm: */
+   define_key("\e[224z", KEY_F(1)); define_key("\e[225z", KEY_F(2));
+   define_key("\e[226z", KEY_F(3)); define_key("\e[227z", KEY_F(4));
+   define_key("\e[228z", KEY_F(5)); define_key("\e[229z", KEY_F(6));
+   define_key("\e[230z", KEY_F(7)); define_key("\e[231z", KEY_F(8));
+   define_key("\e[232z", KEY_F(9)); define_key("\e[233z", KEY_F(10));
+
    getmaxyx(stdscr, h, w);
    if (h < MIN_REQUIRED_HEIGHT || w < MIN_REQUIRED_WIDTH) {
       endwin();
@@ -335,9 +342,10 @@ int main(int argc, char **argv) {
 
    while (!quit) {
       if (zombie_count) {
-         zombie_count--;
-         chldpid = wait(NULL);
-         machmgr_handle_death(chldpid);
+         if ((chldpid = waitpid(-1, NULL, WNOHANG)) > 0) {
+            zombie_count--;
+            machmgr_handle_death(chldpid);
+         }
       }
 
       machmgr_update();
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->rafan 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Apr 20 22:26:13 UTC 2011 
Responsible-Changed-Why:  
Fix synopsis and assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156521 
State-Changed-From-To: open->closed 
State-Changed-By: rafan 
State-Changed-When: Fri Apr 22 15:17:32 UTC 2011 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156521 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/156521: commit references a PR
Date: Fri, 22 Apr 2011 15:17:29 +0000 (UTC)

 rafan       2011-04-22 15:17:15 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/omnitty          Makefile 
     net/omnitty/files    patch-main.c 
   Log:
   - Make it work with "Sun Function-Keys" Xterm
   - Bump PORTREVISION
   
   PR:             ports/156521
   Submitted by:   David O'Brien (obrien@)
   
   Revision  Changes    Path
   1.8       +1 -1      ports/net/omnitty/Makefile
   1.2       +15 -2     ports/net/omnitty/files/patch-main.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
