bug-ed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ed] Two more buglets


From: Martin Guy
Subject: Re: [Bug-ed] Two more buglets
Date: Tue, 12 Apr 2011 18:23:47 +0200

On 12 April 2011 17:48, Antonio Diaz Diaz <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]