1

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)) (process-send-eof proc)

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?

  • Probably depends on the process... – npostavs May 15 '17 at 16:49
  • Ah, you're right. I was being dense. The process is correctly exiting with a 1, but I was naively expecting 0. – abingham May 15 '17 at 17:09
1

Turns out I was doing this correctly, and the process was correctly returning a 1 result. So the posted code is the correct thing to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.