Re: add a "notty" flag to ttys(5) for init(8)

RVP <[email protected]> Sat, 17 May 2025 08:41:32 +0000 (UTC)
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
On Fri, 18 Apr 2025, Greg A. Woods wrote:

> I figured the best way would be to run it from init(8) so that it would
> be running at all times while logins are allowed, and so that init(8)
> could restart it should it ever die.
>
> The problem was that monit, like most programs, doesn't want arbitrary
> arguments on its command line, and the normal way init(8) starts a
> "getty" is to explicitly pass the terminal name as an additional
> argument.  I could have named the session "-I", but that's UGLY.
>

You can already do this with an empty `tty' field:

```
qemu# fgrep httpd /etc/ttys
""	"/usr/libexec/httpd -fqX /tmp"	unknown	on

qemu# ps -Au | fgrep httpd
root    27217  0.0  0.0  17528  3524 ?     I     8:10AM 0:00.01 /usr/libexec/httpd -fqX /tmp 
root    22911  0.0  0.0  11900  1392 ttyE0 O+    8:11AM 0:00.00 fgrep httpd

qemu#
```

-RVP