From patchwork Wed Apr 17 13:21:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yashavanth Chowrikoppalu X-Patchwork-Id: 1086968 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oRjYAQ/M"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OuXHNgcS"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44kjZK2Pcnz9s4V for ; Wed, 17 Apr 2019 23:22:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Q6u+ocn04En+p//POhmtuLyBag3QYZV3wzBCFM0zTHU=; b=oRjYAQ/Mo1/mgV Jf025+ACrnmXUvPkUl+wTOX0rrzQhqKu8ZeWoOxFvZn2FzaKu8WrXautt0QDgcOLfdzRKI8ovBs4E XA0fKXjzSGlBbHcA7vpRZlm0gqjF8QWO85/atHjCESbpk2gU0ny5G4+HcuLG71RGuuv8m6KEmoCAi RdDjrUSaFriVql75c5p8UyYkDzq0SkBfqT8KsWQn+SgXBXJFGKXiPEPDl4HY94eL61H7u1b/gduGQ nUpykNaNJsygRnGMBtlkX2Ib9nJZrHcrpPfmrCQmqPygWAHWXNZtm5lkV/NAzTDFohxP2yXv6gnPt cFm6UZigbRb+5cw3fCmw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGkVP-0007rc-Cf; Wed, 17 Apr 2019 13:21:39 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGkVM-0007rH-BB for openwrt-devel@lists.openwrt.org; Wed, 17 Apr 2019 13:21:37 +0000 Received: by mail-wm1-x344.google.com with SMTP id z24so3595156wmi.5 for ; Wed, 17 Apr 2019 06:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Qdlre5DEN4BIqRhIOfSyZF2n3BxLLMGop8m5Bz3b7mE=; b=OuXHNgcSNgiacSiQdnCtq8iemX6x+eSS1fj4ngFUxG27O66B3fB14jqzjrtNEnfSHI 9TkRxs4tev1qKx4bgo2G75jVrvgyHj4zSbj8qO5iEGssYmFI+YD2F1w1aZBikynHMJ/s GbyJGPcZn8Orun5ZfJwLT2KoaEY/qN4nDSl861TfAAaHhU9NUNFHk0g1rdIg+EKaHJsH rex5NS7oOWA5CkXVNVxoqxiDXN12ciqZyYrk5gz2HPkFS1Df08NT0kIf03e0/yowPDuu ypJaOGOc9lyWunB2MpvePJFdMhX2cgawwH5Jh95oGY1fOxPUKGwEgddHdHo2IlVtpLnO N5jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Qdlre5DEN4BIqRhIOfSyZF2n3BxLLMGop8m5Bz3b7mE=; b=gpxyg3tbIvXOk0CSNYafPtFsevaAdCILY4YyFurYPr18X2J638FwVw5DBNzhl/AWsk bNYJd/YviZ/KAqH66MSb7tXdimnRyfp3u001yXS4dz+PnPZfU2d7Ha7q7Z05mTaCcBvA 5zqufFC+PGf6pcVtuiGo+SsGadwGUoVETb4GspDNJgQsE4Yjsvi6TbEnNe3HXqnHPCGk A9ZxBo+aUi2MGTbFoeIOsuAS+f3bAVecbj4ehVazQw7kBQqWX03/H91ZbimpOYvo8lTK fwyytVsJDv3Ebg5C2mKtnvPUWE7UedQo2mzLrQUXvZ1Fhi8hLv991h8HpCMFGpqYc0Wg merg== X-Gm-Message-State: APjAAAUnoUc7uOsY/JVDAK5e1nGJy7YcSMY6R1uAf3I6DT3X5STS+Bmw +zvzBzN3GDqiTEP8aYJnHm6NpRBEbLk= X-Google-Smtp-Source: APXvYqx5d0P8+Nz2qE6wHKUmOCZNMyCcDkBcU343Ulb01ZcQzBz9nwA08UYP7vOCK+rIDT/DDyTQpg== X-Received: by 2002:a1c:7e0e:: with SMTP id z14mr30875968wmc.95.1555507293868; Wed, 17 Apr 2019 06:21:33 -0700 (PDT) Received: from localhost.localdomain (x2f7f51f.dyn.telefonica.de. [2.247.245.31]) by smtp.gmail.com with ESMTPSA id w14sm53158680wrr.16.2019.04.17.06.21.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 06:21:33 -0700 (PDT) From: Yashavanth Chowrikoppalu X-Google-Original-From: Yashavanth Chowrikoppalu To: openwrt-devel@lists.openwrt.org Date: Wed, 17 Apr 2019 15:21:18 +0200 Message-Id: <20190417132118.9432-1-Yashavanth.hsn@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190417_062136_385354_A4B584FA X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (yashavanth.hsn[at]gmail.com) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [OpenWrt-Devel] [PATCH] procd: copy the respawn property of new instance X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yashavanth Chowrikoppalu MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org On updating an existing instance, the respawn property is reset in instance_stop(). Subsequent instance_update() call does not copy the respawn property from new instance in instance_config_move(). As a result, the respawning does not happen, if the process is killed externally. Signed-off-by: Yashavanth Chowrikoppalu --- service/instance.c | 1 + 1 file changed, 1 insertion(+) diff --git a/service/instance.c b/service/instance.c index 3512f66..ac96f7d 100644 --- a/service/instance.c +++ b/service/instance.c @@ -967,6 +967,7 @@ instance_config_move(struct service_instance *in, struct service_instance *in_sr in->trigger = in_src->trigger; in->command = in_src->command; in->pidfile = in_src->pidfile; + in->respawn = in_src->respawn; in->respawn_retry = in_src->respawn_retry; in->respawn_threshold = in_src->respawn_threshold; in->respawn_timeout = in_src->respawn_timeout;