Issue is about Login/Interactive shell versus Non-interactive shell and as Helio said, using read/write will essentially open interactive shell and tends to work ![]()
For example; see answers in this question; Difference between Login Shell and Non-Login Shell? - Unix & Linux Stack Exchange