From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4552 invoked from network); 24 Feb 2022 01:27:41 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 24 Feb 2022 01:27:41 -0000 Received: (qmail 25964 invoked by uid 89); 24 Feb 2022 01:28:00 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 25957 invoked from network); 24 Feb 2022 01:27:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thescrapyard-org.20210112.gappssmtp.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=8uuxI5yM6YWygSfl6SORyLj4hGFisrhJyioQAkY6nYU=; b=ij++5EsuH5qkahaD/MyH/d1HkfjdGNT2gTeiZ1rcuF07JEMHCoO5aaAyUWuXU/W/sO RITvGwYa6NSpGoCpqvk4rdKrrqkDfgvEFR4fcuOfF7kJG3ty+/IpO2SRvsizb94diBel gkmi6HuWQ6bSPdBwdxDxt5CoFagruK1aXRdC8zszB6euG0fNNhiohPyk0fjduc8d/vPw k4cJuVotWliGZXgksGCkqLUMkp5YUuGKp9ZOKSvAP0q7BlRchkSymFLH2hFPwjyQJbMQ gk+NC8RUUWtIsoyBlgo/OyCGfOUY1eXWRCOhEM8WK3Sp6PXpYx4XZA1BPWGlDjv8kAj+ moIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8uuxI5yM6YWygSfl6SORyLj4hGFisrhJyioQAkY6nYU=; b=3BA6aEObyMDjhGvV6bRAL1gpfFpQ1NyALH3JzpdYxj8GQ/jazEdMbKhKyNvlYIWrwP 9GtDpg3q6BLEzcoShFvrwJxZXhiuP+1rKDCF3VPehClvR2U1Cz+n71cjvXnhkAptcU6K 8J9d4mubu3LiVA+ZR2r3UFS931G0YgyUsEEPid8yP/CG9wh0BZmofDGnyvlldx0rS1ox uAiNCZ7twt7rOG+6xuCzOkFoXCnOfX9bfbpSUAFu01Ie2fBP+UNCtpSe6JZcjMNgbp35 V8/9dGetgflIUZogcnrn56sF4ByRC2Sr57KXyVCfsv/Wbs/TI43zr4pDyEnCCn0MSPKq OdgQ== X-Gm-Message-State: AOAM532pyldx6zKOdpQfsQx58V+aUCq0/e6YnMalHjtkCQqyHOCVoCpF E1MG61yGJ2Q53fN1yxA3iYCbhVdoeH8eCx9tRhsyaOUhpRM= X-Google-Smtp-Source: ABdhPJxJFTl2YEBqAyf1JypWEGzhBg8LyPeJKh/AMyI7guRR2hCKFGvwO0vy15ER6ivKJFL0/YNrqu7KSi4sq2SVvEo= X-Received: by 2002:a17:90b:3503:b0:1bc:5d68:e7a2 with SMTP id ls3-20020a17090b350300b001bc5d68e7a2mr345608pjb.29.1645666050905; Wed, 23 Feb 2022 17:27:30 -0800 (PST) MIME-Version: 1.0 From: Jan-willem De Bleser Date: Wed, 23 Feb 2022 17:27:19 -0800 Message-ID: Subject: s6-svscan shutdown notification To: supervision@list.skarnet.org Content-Type: multipart/alternative; boundary="000000000000622e6005d8b97c18" --000000000000622e6005d8b97c18 Content-Type: text/plain; charset="UTF-8" Hi, What's the cleanest way to wait on s6-svscan to shut down after issuing of a SIGTERM (say s6 via-svscanctl -t)? I'm using s6 to manage daemons in FreeBSD jails, and am trying to work out the cleanest way to shut things down. I want to use the built-in 'jail' command for this since it takes care of host operations like unmounting the jail filesystems and recovering/freeing network interfaces, but in and of itself it just issues a SIGKILL inside the jail. It can optionally run a shutdown script, say one that calls "s6-svscanctl -t", but I need some way to delay the ending of that script until the supervision tree has actually shut down: some of the managed processes will need to flush data to disk. Looking at the documentation, my only option appears to be to check if the return code of s6-svscanctl is 100, or maybe to monitor for the existence of .s6-svscan/control (not sure if it's removed on exit). Are there any other ways to monitor s6-svscan? Is the communication protocol between s6-svscanctl and s6-svscan via .s6-svscan/control documented anywhere? These jails are service jails with no shells installed, so if I have to check for a return code of exactly 100 then I'll have to write a specific tool for that, at which point it may be better for me to write a 'scanwait' tool of some sort that just checks for existence. Cheers, Jw --000000000000622e6005d8b97c18--