Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2005 12:38:19 GMT
From:      Thierry BESANCON <Thierry.Besancon@math.jussieu.fr>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/84168: portmanager 0.2.9_4 can't go background
Message-ID:  <200507271238.j6RCcJiE042777@www.freebsd.org>
Resent-Message-ID: <200507271240.j6RCeGI1012570@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         84168
>Category:       ports
>Synopsis:       portmanager 0.2.9_4 can't go background
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 27 12:40:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Thierry BESANCON
>Release:        5.2.1 RELEASE
>Organization:
IMJ
>Environment:
FreeBSD lebesgue.math.jussieu.fr 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0: Tue Jul 13 16:10:02 GMT 2004     root@lebesgue.math.jussieu.fr:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
      The application named "portmanager" available in the ports just gives a segmentation fault when run under crontab as "portmanager -s".
It is version : "portmanager 0.2.9_4 VERSION info:"

The bug is quite simple. In portmanager.c one plays with the TERM  environment variable to change the title bar of the xterm the user  might use. Unfortunatly under crontab, the TERM variable is unset and getenv() just returns NULL and that makes strncmp() segfaults.
>
>How-To-Repeat:
      Launch "portmanager -s" through crontab.  It will report segmentation fault.
>Fix:
In portmanager.c, just change :

 	if( !strncmp( getenv("TERM"), "xterm", 5 ) )

to

	if( getenv("TERM") && !strncmp( getenv("TERM"), "xterm", 5 ) )

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507271238.j6RCcJiE042777>