Package: pcscd
Version: 1.7.1-1
Severity: normal
Tags: patch

Sometimes, when i restart or shutdowm my computer i find this message:

Currently running processes (pstree):
init-+-pcscd---2*[(pcscd)]

and the computer freezes for a few seconds.

So, i think the problem is pcscd process is still alive

I have modified the start/stop script so, when stoping, it now searchs for
the pid of any pcscd process and kill it. Obviously the script is runned in
shutdowns/restarts

It fixes the problem for me.

I have seen pcscd finish itself on 60 seconds, maybe another solution is to 
reduce this number or make it user configurable (I haven`t found any option to
do this).

Thanks in advance

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (800, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38.1.ruben (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pcscd depends on:
ii  adduser                       3.112+nmu2 add and remove users and groups
ii  libc6                         2.11.2-13  Embedded GNU C Library: Shared lib
ii  libccid [pcsc-ifd-handler]    1.4.2-2    PC/SC driver for USB CCID smart ca
ii  libudev0                      166-1      libudev shared library
ii  lsb-base                      3.2-27     Linux Standard Base 3.2 init scrip

pcscd recommends no packages.

pcscd suggests no packages.

-- Configuration Files:
/etc/init.d/pcscd changed:
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="PCSC Lite resource manager"
NAME=pcscd
DAEMON=/usr/sbin/$NAME
IPCDIR=/var/run/pcscd
PIDFILE=$IPCDIR/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
rm -rf $IPCDIR
mkdir $IPCDIR
chgrp pcscd $IPCDIR
chmod g+w $IPCDIR
if [ "$1" != "stop" ]
        then exit 0
fi
[ -x "$DAEMON" ] || exit 0
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
.. /lib/init/vars.sh
.. /lib/lsb/init-functions
ENV_FILE="none"
[ -r /etc/environment ] && ENV_FILE="/etc/environment"
[ -r /etc/default/locale ] && ENV_FILE="/etc/default/locale"
value=$(egrep "^[^#]*LANG=" $ENV_FILE | tail -n1 | cut -d= -f2)
eval LANG=$value
do_start()
{
        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON 
--test > /dev/null \
                || return 1
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                $DAEMON_ARGS \
                || return 2
        # Add code here, if necessary, that waits for the process to be ready
        # to handle requests from services started subsequently which depend
        # on this one.  As a last resort, sleep for some time.
}
do_stop()
{
        # Return
        #   0 if daemon has been stopped
        #   1 if daemon was already stopped
        #   2 if daemon could not be stopped
        #   other if a failure occurred
        start-stop-daemon --stop --quiet --retry=3 --pidfile $PIDFILE --name 
$NAME
        RETVAL="$?"
        [ "$RETVAL" = 2 ] && return 2
        PCSCD_PID=`pidof /usr/sbin/$NAME`
        if [ $PCSCD_PID ]
                then kill $PCSCD_PID
        fi
}
do_reload() {
        #
        # If the daemon can reload its configuration without
        # restarting (for example, when it is sent a SIGHUP),
        # then implement that here.
        #
        start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name 
$NAME
        return 0
}
case "$1" in
  start)
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
        do_start
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  #reload|force-reload)
        #
        # If do_reload() is not implemented then leave this commented out
        # and leave 'force-reload' as an alias for 'restart'.
        #
        #log_daemon_msg "Reloading $DESC" "$NAME"
        #do_reload
        #log_end_msg $?
        #;;
  restart|force-reload)
        #
        # If the "reload" option is implemented then remove the
        # 'force-reload' alias
        #
        log_daemon_msg "Restarting $DESC" "$NAME"
        do_stop
        case "$?" in
          0|1)
                do_start
                case "$?" in
                        0) log_end_msg 0 ;;
                        1) log_end_msg 1 ;; # Old process is still running
                        *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
          *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
  *)
        #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
        exit 3
        ;;
esac
:


-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to