[BusyBox] [PATCH] kill error message

Vladimir N. Oleynik dzo at simtreas.ru
Wed Aug 17 08:14:15 UTC 2005


Rob,

>>But uclibc support register_printf_function().
>>If add to busybox autoconfigure for check "%m" or not,
>>we can use this code (tested):
> 

> I seldom manage to understand what you're actually saying, but I are you 
> suggesting busybox start using autoconf?

Require long time ago. ;-)

>>>>>>AFTER
>>>>>># kill 1234
>>>>>>kill: 3: kill 1234: No such process
>>>>
>>>>Really to like you here this result?
>>>
>>>Assuming your translator program meant something like "Do you really like
>>>this result"?  The answer is "I personally don't strongly care one way or
>>>the other".
>>
>>Hmm.
>>Do you really like show the double "kill" word?
> 
> 
> Not really, no.

My local ash version outdated.
Only hands patch for bash-like errors message:
ash: kill: (pid) - Operation not permitted

Please change exvwarning() to new:

static void
exvwarning(const char *msg, va_list ap)
{
         FILE *errs;

         errs = stderr;
         fprintf(errs, "%s: ", arg0);
         if (commandname) {
                 const char *fmt = (!iflag || parsefile->fd) ?
					"%s: %d: " : "%s: ";
                 fprintf(errs, fmt, commandname, startlinno);
         }
         vfprintf(errs, msg, ap);
         outcslow('\n', errs);
}


and line with kill() and sh_warnx() to

                 if (kill(pid, signo) != 0) {
                         sh_warnx("(%d) - %m\n", pid);


--w
vodz



More information about the busybox mailing list