On 5 Jun 2002, Stephen J. Turnbull wrote:
>>>>> "Simon" == Simon Josefsson
<jas(a)extundo.com> writes:
Simon> "Jason R. Mastaler" <jason(a)mastaler.com> writes:
>> Simon Josefsson <jas(a)extundo.com> writes:
>>
>>> I looked at it. This patch should fix it, does it?
>> No, it doesn't.
Simon> Hm, `call-process-region' doesn't return anything useful
Simon> when this happens:
Jason's example is bogus here; the invocation of /tmp/emptyfile
succeeds! (At least on Linux, under ash, bash, and csh.) Dunno what
a POSIX shell is supposed to do in this case....
(let ((sendmail-program "/tmp/emptyfile"))
(call-process-region (point-min) (point-max) sendmail-program nil nil nil))
Put "#!/bin/sh\nexit 1\n" in /tmp/exit1, and try again.
I agree, the example was bogus. It seems rather weird to be able to
exec() a 0b file though.
However, the patch should still be applied, I think, because otherwise you
don't get any return value at all. Try running your example with BUFFER
being 0 instead of nil, which is used in sendmail.el right now, and with
the small program returning non-0. There is no indication that something
went wrong. This probably solves the original problem.