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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19753 invoked from network); 17 Oct 2020 00:35:58 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 17 Oct 2020 00:35:58 -0000 Received: (qmail 2186 invoked by uid 89); 17 Oct 2020 00:36:19 -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 2179 invoked from network); 17 Oct 2020 00:36:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kasad.com; s=mail; t=1602894947; bh=EkAW0rCNTzCke/pZENYRIg8R156EuI4GY+BVtzz5efQ=; h=Date:From:To:Subject:From; b=QQFHevSxRIM6biQZzMr+rs0rnIwZOopRcWo4YFjXWh86TUCatwzScDqfG5DgMvvo/ LmzLyPrO4swPETPDmmRuIAycHWXZ9MgLYWLzMfFnJiDVwqQ7HSEIg9e/E7HhjWc33I Nwu2gqqbscX6FzLmDVE0okU83pDDrb3z9xHjeoxaWXZTDDJbR2Ght72KMfy+nCKIa3 9mDSNNurfiKNfdGmos6z+uteeoQ59BQKR1SPYhm4eXTYSlIOEQ6Lvy17OoNtyfEm2c cYTWleU4BP2e9Mb0p9h9x9OqP7n+Xc8rvHtHiKtkkz1bV+oAoPMveRynK5ccO8Lh6m iGXRJh8yRfsJg== Date: Fri, 16 Oct 2020 17:35:45 -0700 From: Kian Kasad To: supervision@list.skarnet.org Subject: runit: run process in a tty Message-ID: <20201017003545.6k2vys6psg4izccg@frisbee> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="26za7ovoj5nsdbrq" Content-Disposition: inline --26za7ovoj5nsdbrq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I'm trying to have a runit service spawn `/usr/bin/ly` in a certain tty (tty2). I've tried redirecting std{in,out,err} to the tty: exec /usr/bin/ly /dev/tty2 2>&1 but this didn't work. I tried the openvt(1) program, which has a flag `-e` to exec the program instead of forking it: openvt -ec 2 /usr/bin/ly This returned an error: Unable to open file: /dev/tty2: Operation not permitted. However, openvt(1) works when using the `-w` (wait) flag instead of `-e` (exec). So my questions are: - Does anyone know why this happens? - Is there a better way to spawn a process on a certain tty with runit? Thanks, Kian Kasad --26za7ovoj5nsdbrq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRrgCQ5gHlZM+2U6fU7QHlES2ZOcgUCX4o8XgAKCRA7QHlES2ZO cqRGAQDg9bKg4/eOO2hhl8PYGa3bo+lX0mTZkhCmaggoGflD8wD+Op+GN4bZonIi 7jZCNjyS47FDl8+8jydvE5ei0yIgcg4= =koBh -----END PGP SIGNATURE----- --26za7ovoj5nsdbrq--