- **status**: assigned --> review
- **Milestone**: future --> 5.17.06



---

** [tickets:#2410] samples: amf_demo_script missed to define $piddir**

**Status:** review
**Milestone:** 5.17.06
**Created:** Mon Apr 03, 2017 11:43 AM UTC by Nguyen TK Luu
**Last Updated:** Mon Apr 03, 2017 11:44 AM UTC
**Owner:** Nguyen TK Luu


The $piddir variable (containing path to amf_demo component's pid file) is 
missed to be defined in amf_demo_script. This could lead to the amf_demo 
process not getting truely killed in some cases when cleanup is called (e.g 
when invoking saAmfComponentErrorReport()), leaving the process unmanaged by 
AMF.

~~~
samples/amf/sa_aware/amf_demo_script:

# Source LSB functions library
. /lib/lsb/init-functions

compname=`echo $SA_AMF_COMPONENT_NAME | md5sum | awk '{print $1}'`
pidfile="$piddir/${compname}.pid"

stop()
{
        echo -n "Stopping $prog: "
        killproc -p $pidfile $binary
        RETVAL=$?
        if [ $RETVAL -ne 0 ]; then
                logger -st $name "killproc $binary failed"
        fi
        return $RETVAL
}
~~~


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to