Add a temporary workaround to the chrome wrapper script that checks

if the SingletonLock file is available and valid.
The problem is that when chrome crashes one of the destructors fail to
remove the lockfile and then when you start chrome again, it will
try to communicate with the old PID of the chromium main process, because
the SingletonLock file will point to `hostname`-PID_of_old_chromium and
since that process is not running anymore, startup will fail.
This commit is contained in:
robert 2012-05-17 08:52:59 +00:00
parent acb35341d2
commit 1f4053bbd9
2 changed files with 16 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.94 2012/05/05 14:03:39 robert Exp $
# $OpenBSD: Makefile,v 1.95 2012/05/17 08:52:59 robert Exp $
ONLY_FOR_ARCHS= i386 amd64
@ -7,6 +7,8 @@ COMMENT= Chromium browser
V= 18.0.1025.168
DISTNAME= chromium-${V}
REVISION= 0
CATEGORIES= www
HOMEPAGE= http://code.google.com/chromium/

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: chrome,v 1.8 2012/01/11 16:24:07 ajacoutot Exp $
# $OpenBSD: chrome,v 1.9 2012/05/17 08:52:59 robert Exp $
DATASIZE="716800"
OPENFILES="400"
@ -22,4 +22,16 @@ if [ $(ulimit -Sn) -lt ${OPENFILES} ]; then
[ $? -eq 0 ] || exit
fi
#
# Temporary workaround for the case when chromium crashes and leaves
# the SingletonLock, which prevents chromium to start up.
#
if [ -h ${HOME}/.config/chromium/SingletonLock ]; then
_pid=`readlink ${HOME}/.config/chromium/SingletonLock | cut -d '-' -f 2`
kill -0 ${_pid} 2>/dev/null
if [ $? -gt 0 ]; then
rm ${HOME}/.config/chromium/SingletonLock
fi
fi
exec "${TRUEPREFIX}/chrome/chrome" "${@}"