From: Kian Kasad <kian@kasad.com>
To: supervision@list.skarnet.org
Subject: runit: run process in a tty
Date: Fri, 16 Oct 2020 17:35:45 -0700 [thread overview]
Message-ID: <20201017003545.6k2vys6psg4izccg@frisbee> (raw)
[-- Attachment #1: Type: text/plain, Size: 636 bytes --]
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 >/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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next reply other threads:[~2020-10-17 0:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-17 0:35 Kian Kasad [this message]
2020-10-17 4:50 ` Érico Nogueira
2020-10-17 10:43 ` Jonathan de Boyne Pollard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201017003545.6k2vys6psg4izccg@frisbee \
--to=kian@kasad.com \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).