Skip to main content
Tweeted twitter.com/StackUnix/status/840761572888838144
added 421 characters in body
Source Link
uMinded
  • 201
  • 2
  • 4

I have a remote serial device attached to /dev/ttyAMA0 that requires a serial command to be issued before a program connects so that the program will read the return string and automatically recognize it. I can not change the behavior of the main program.

Is there any way to run a script when a userland program accesses a /dev/tty character device?

Adding a udev rule only runs during boot and not, say when I connect with minicom.

I was researching a way to make a fake character device that would do this but it was looking like I would need to write a device driver.

Is there any way to run a script when a program accesses a /dev/tty device?

Adding a udev rule only runs during boot and not, say when I connect with minicom.

I have a remote serial device attached to /dev/ttyAMA0 that requires a serial command to be issued before a program connects so that the program will read the return string and automatically recognize it. I can not change the behavior of the main program.

Is there any way to run a script when a userland program accesses a /dev/tty character device?

Adding a udev rule only runs during boot and not, say when I connect with minicom.

I was researching a way to make a fake character device that would do this but it was looking like I would need to write a device driver.

Is there aany way to run a script when a program accesses a /dev/tty/dev/tty device?

Adding a udevudev rule only runs during boot and not, say when I connect with minicom.

Is there a way to run a script when a program accesses a /dev/tty device?

Adding a udev rule only runs during boot and not, say when I connect with minicom.

Is there any way to run a script when a program accesses a /dev/tty device?

Adding a udev rule only runs during boot and not, say when I connect with minicom.

Source Link
uMinded
  • 201
  • 2
  • 4

Run script on /dev/tty access

Is there a way to run a script when a program accesses a /dev/tty device?

Adding a udev rule only runs during boot and not, say when I connect with minicom.