Also switch PostMessage to SendMessageWithTimeout and only send one if environment variables actually changed. Also, enable and fix --permanent unit tests.
Also switch PostMessage to SendMessageWithTimeout and only send one if environment variables actually changed. Also, enable and fix --permanent unit tests.