<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 13, 2023 at 11:12 AM Giuseppe Sacco <<a href="mailto:giuseppe@sguazz.it">giuseppe@sguazz.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
I am working on hylafax, a program for sending and receiving faxes, and I<br>
am facing a problem when it should wait for a device that is not in /dev/<br>
but in /dev/pts/. It seems that udev events only cover device creation in<br>
/dev/ and are not fired when the device appear in /dev/pts.<br></blockquote><div><br></div><div>Pseudoterminals are not actually "devices" – they don't exist in /dev or /sys, only in their own separate virtual filesystem (/dev/pts is not part of /dev), so there are no kernel uevents (and therefore no udev events) for the creation of a pty.<br></div><div><br></div><div>I'm not entirely sure whether it even makes sense for a .service unit to wait for a specific pty? I mean, the entire design of ptys is that they're assigned on a first-come basis and there's no way for a process to claim a specific pty for itself, so there's no way for faxgetty@.service to be sure that pty/0 is your fax thing and not e.g. someone's xterm or an incoming SSH connection.<br></div><div><br></div><div>What is supposed to be creating /dev/pts/0 in your case? It might be simplest to have the same software directly start faxgetty@<ptyname>.service as well.<br></div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>