On 12 April 2011 17:48, Antonio Diaz Diaz <[email protected]> wrote:
> Martin Guy wrote:
>> main_loop.c: In function 'exec_command':
>> main_loop.c:611: warning: ignoring return value of 'system', declared
>> with attribute warn_unused_result
>
> Of course I would like to fix this. Please, what do you all think should do
> ed in case 'system' fails to execute succesfully? Ignoring it like now and
> shut-up the compiler warning, or perhaps showing an error message like
> "can't execute command"?

If the command itself fails giving non-zero exit status, or even if
the command doesn't exist, these seem not to be errors that should be
acted upon;
currently both versions leave it to "sh" to print a one-line error message.

That just leaves not being able to fork() and "/bin/sh" not existing,
both of which silently read 0 bytes at present (in GNU ed; I can't
easily test this with old ed)
Or you could just ignore it. It's very unlikely to happen, and it's
not clear what we should do differently anyway.  The compiler warning
was what bothered me.

    M

_______________________________________________
bug-ed mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-ed

Reply via email to