Hi Neil, Neil Horman [2007-07-28 13:21 -0400]: > Jeremy asked that I make a patch next week to address split_argv's requirement > that the argc parameter be non-NULL. I'll be fixing that next week, and what I > can do is further enhance it such that it ignores spaces in quoted strings, > which should address the case that concerns you. I.E I can make split_argv > behave such that: > echo "|\"foo bar\" --pid %p" > /proc/sys/kernel/core_pattern > results in the following argv: > {{"foo bar"}, {"--pid"}, {"1234"}} > > Which I think handles what you are looking for. Oh, handling escaping and quoting is going to make it fairly complicated, but sure, if you need that for other things, too, that would solve the remaining case. I just wonder if, instead of implementing escaping, it wouldn't be easier to first split on spaces and then escape macros? > Thank you for clearing me up on this. So it would seem we're ok with what we > have now, correct? Absolutely, yes. > We just have a potential corner case to address, which I can > reasonably handle with a modification to split_argv, that I have a > todo on next week. Right, it's really just for perfectionism. Spaces in executable names are EBW anyway, and readlink()ing /proc/<pid>/exe is much more robust anyway in terms of a small and orthogonal interface. If the upstream kernel guys don't worry about it and consider it a blocker for merging, I don't either. :-) Thanks a lot, Martin -- Martin Pitt http://www.piware.de Ubuntu Developer http://www.ubuntu.com Debian Developer http://www.debian.org
Attachment:
signature.asc
Description: Digital signature
- Follow-Ups:
- References:
- [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe
- From: Neil Horman <[email protected]>
- Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe
- From: Martin Pitt <[email protected]>
- Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe
- From: Neil Horman <[email protected]>
- Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe
- From: Martin Pitt <[email protected]>
- Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe
- From: Neil Horman <[email protected]>
- [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe
- Prev by Date: Re: [ck] Re: Linus 2.6.23-rc1
- Next by Date: Re: [ck] Re: Linus 2.6.23-rc1
- Previous by thread: Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe
- Next by thread: Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe
- Index(es):