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
Received on Sat Oct 17 2020 - 00:35:45 UTC