Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

tee_tty reads from the physical serial port that the GPS is connected to and sends that data to pseudo-terminals, one read by ntpd and one read by the dsm process. It appears that if tee_tty dies, then ntpd goes into an infinite loop, mishandling, or misdetecting not detecting the error on the input port and getting in a read loop.

Previously I tried to change ntpd so that it might catch the error and not hangexit without hanging, but no success.

Now I might know why the tee_tty is being sent the SIGINT signal. I turns out the serial port is opened in "cooked" mode, which means that if it somehow receives a ctrl-C on that port then the process is sent a SIGINT. I guess a ctrl-C could also be received on any pseudo-terminal that is opened for reading. A BREAK condition can also result in a SIGINT, but IGNBRK is set on the serial port, and I don't believe BREAKs can be sent over pseudo-terminals.

...