Re: [Jack-Devel] jack session command line

PrevNext  Index
DateMon, 11 Apr 2011 23:08:42 +0100
From Rui Nuno Capela <[hidden] at rncbc dot org>
ToJulien Pommier <[hidden] at modartt dot com>
Cc[hidden] at lists dot jackaudio dot org
In-Reply-ToJulien Pommier Re: [Jack-Devel] jack session command line
Follow-UpJulien Pommier Re: [Jack-Devel] jack session command line
On 04/11/2011 07:08 PM, Julien Pommier wrote:
>
> On 11 avr. 2011, at 16:24, Rui Nuno Capela wrote:
>>>
>>> Shouldn't something be specified about whitespace handling in the
>>> command_line that is filled during the jack session callback ? As far
>>> as I know, nothing is said in jack/session.h or elsewhere about how
>>> the session manager will tokenize that command line when restoring
>>> the saved session. Right now it seems that qjackctl is just splitting
>>> the command-line at each whitespace, which does not work as expected
>>> if ${SESSION_DIR} contains whitespaces.
>>>
>>
>> it is a session participating client's responsability to stuff its own
>> command line, specifically about where "${SESSION_DIR}" gets into
>> it--maybe it's not quoting it properly--it is not qjackctl's and maybe
>> not any other session manager for that matter.
>
> Agreed, but the session manager is still tokenizing the command line
> into an array of strings before calling exec(), if it is just splitting
> the command line with respect to each whitespace, what should the
> session client put in that command line if it has a whitespace in its
> own name (or in its path) ?
>
> A simple rule stating that in the command-line argument separation is
> performed with respect to whitespaces except for those that are escaped
> by a backslash would help to prevent these issues, I think.
>

afaics, the client should use ... "${SESSION_DIR}" ... literally, 
including the double-quotes

byee
-- 
rncbc aka Rui Nuno Capela
[hidden]
PrevNext  Index

1302559685.17359_0.ltw:2,a <4DA37BEA.9080401 at rncbc dot org>