I'm starting a process with
start-process and immediately calling
set-process-sentinel to get notifications when it ends. After attaching the sentinel I send the buffer's contents to the process's stdin followed by EOF, like this:
(process-send-region proc (point-min) (point-max))
I'm seeing the correct output in the process's output buffer, so I know it's working correctly to some degree.
But my sentinel reports that the process ends with event "exited abnormally with code 1", but I would like the process to end normally with the "finished" event. Why am I seeing this abnormal exit? What can I do to get a normal exit?