1 Star 0 Fork 0

深度游子/arduino-eclipse-plugin

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
travis_exec_and_print_time.sh 791 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
echo "Exec and print time periodically - overcoming long quiet times"
#Test command
#CMD="sleep 5"
#echo "CMD=$CMD"
#$CMD &
#Take first argument as the command to execute
echo "CMD=$1"
$1 &
PID=$!
echo "Testing for PID=$PID"
#Sleep for X seconds and then test if the PID is still active
# inefficient (only breaks in intervals of timer) but not too bad for this use case
# also not safe from race conditions in general but fine here
while ps | grep " $PID " | grep -v grep > /dev/null 2>&1
do
sleep 180
echo "PID=$PID still running at $SECONDS seconds"
done
echo "Ran for $SECONDS seconds"
#Wait will get the process even if it has already exited in this session
#echo "Waiting on PID=$PID"
wait $PID
STATUS=$?
echo "Exit status of $STATUS"
exit $STATUS
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/zusmart/arduino-eclipse-plugin.git
git@gitee.com:zusmart/arduino-eclipse-plugin.git
zusmart
arduino-eclipse-plugin
arduino-eclipse-plugin
master

搜索帮助