1 Star 0 Fork 0

yuek_kang / egt-launcher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
launch.sh 563 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
#
# Helper script for launching a background process.
#
handle_exit_key()
{
# try to read KEY_0 from keyboard0 to exit the application
device='/dev/input/keyboard0'
if [ -c "$device" ]
then
(
key_0='*type 1 (EV_KEY), code 11 (KEY_0), value 1*'
evtest "$device" | while read line; do
case $line in
($key_0)
killall -9 $1
exit 0
;;
esac
done
) &
fi
$@
}
run()
{
handle_exit_key $@
egt-launcher
}
# close stdout, stderr, stdin and double fork - it's magic
((run $@ >&- 2>&- <&- &)&)
1
https://gitee.com/yuek-kang/egt-launcher.git
git@gitee.com:yuek-kang/egt-launcher.git
yuek-kang
egt-launcher
egt-launcher
master

搜索帮助