[patchew-devel] [PATCH 4/4] importer: Kill `patchew-cli import` command if timeout

  • From: Fam Zheng <famz@xxxxxxxxxx>
  • To: patchew-devel@xxxxxxxxxxxxx
  • Date: Sat, 24 Feb 2018 15:47:25 +0800

It resolves some rare hanging in the patchew import command.

Signed-off-by: Fam Zheng <famz@xxxxxxxxxx>
---
 scripts/patchew-importer | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/patchew-importer b/scripts/patchew-importer
index 4a72a28..5e80fb5 100755
--- a/scripts/patchew-importer
+++ b/scripts/patchew-importer
@@ -73,7 +73,7 @@ imported()
 import()
 {
     echo import $@
-    if ! $PATCHEW_CLI import $@; then
+    if ! timeout -k 600 600 $PATCHEW_CLI import $@; then
         cp $@ $BAD_MESSAGES_DIR
         echo "(bad message saved in $BAD_MESSAGES_DIR)"
     fi
-- 
2.14.3


Other related posts:

  • » [patchew-devel] [PATCH 4/4] importer: Kill `patchew-cli import` command if timeout - Fam Zheng