Re: [Jack-Devel] jack session command line

PrevNext  Index
DateMon, 11 Apr 2011 20:08:01 +0200
From Julien Pommier <[hidden] at modartt dot com>
ToRui Nuno Capela <[hidden] at rncbc dot org>
Cc[hidden] at lists dot jackaudio dot org
In-Reply-ToRui Nuno Capela Re: [Jack-Devel] jack session command line
Follow-UpRui Nuno Capela Re: [Jack-Devel] jack session command line
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.

--
Julien
PrevNext  Index

1302545367.20472_0.ltw:2,a <3A109730-7E97-49CD-A7FA-590A7DC4E037 at modartt dot com>