Re: [RFC] teach argv_split() to ignore the spaces surrounded by \e

From: Oleg Nesterov
Date: Mon May 13 2013 - 13:17:16 EST


On 05/13, Colin Walters wrote:
>
> On Mon, 2013-05-13 at 16:35 +0200, Oleg Nesterov wrote:
>
> > Yes, we can change format_corename() to construct "argv" by hand, and
> > this was my iniital plan. But perhaps it would be better to not uglify
> > this code even more?
>
> Sure this \e is less code, but it seems pretty ugly to me.

Yes, I am not proud of this idea. But it is simple.

> Maybe a way
> to keep fs/coredump.c sane would be always constructing an argv, and
> then in the !ispipe case just join them into one string.

I don't think we should construct an argv if !ispipe, but this is minor.
The patch should be simple anyway. Just I do not want to touch this code ;)
and to complicate it more. and create another (2nd) case when when we need
to construct argv by hand.

> Though I'm still inclined to change systemd to read /proc/pid/cmdline
> like abrt does; that way it works on current kernels too.

Oh, I will be really happy to leave this this code alone and do nothing ;)

except format_corename() has another bug, it can leak ->corename but this
is another story (I'll send the patch).

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/