supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* runit: run process in a tty
@ 2020-10-17  0:35 Kian Kasad
  2020-10-17  4:50 ` Érico Nogueira
  2020-10-17 10:43 ` Jonathan de Boyne Pollard
  0 siblings, 2 replies; 3+ messages in thread
From: Kian Kasad @ 2020-10-17  0:35 UTC (permalink / raw)
  To: supervision

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-17 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-17  0:35 runit: run process in a tty Kian Kasad
2020-10-17  4:50 ` Érico Nogueira
2020-10-17 10:43 ` Jonathan de Boyne Pollard

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).