Bug 2114 - (int-53159) run-standalone.sh expands parameters incorrectly.
(int-53159)
: run-standalone.sh expands parameters incorrectly.
Status: CLOSED FIXED
Product: Desktop platform
general
: 3.2
: All Linux
: Medium normal (vote)
: ---
Assigned To: Carlos Guerreiro
: HAF QA mailing list
:
:
:
:
  Show dependency tree
 
Reported: 2007-10-13 12:31 UTC by Aleksandr Koltsoff
Modified: 2007-11-28 13:10 UTC (History)
1 user (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Aleksandr Koltsoff (reporter) 2007-10-13 12:31:30 UTC
/usr/bin/run-standalone.sh (same script in both SDK and device) expands the
command line parameters without preserving paramater boundaries, which leads to
problems when running programs that have parameters which contain spaces in
the.

Example (runniable on both):
run-standalone.sh dbus-send --print-reply --type=method_call
--dest=com.nokia.statusbar /com/nokia/statusbar
com.nokia.statusbar.system_note_dialog string:'Hello world' int32:2
dbus-send: Data item "world" is badly formed

EXPECTED OUTCOME:

A dialog that opens via D-Bus from the statusbar component, containing
"information"-icon and test "Hello World".

ACTUAL OUTCOME:

dbus-send sees string:Hello and World as two separate parameters due to
incorrect quoting in run-standalone.sh and hence fails to run.

STEPS TO REPRODUCE THE PROBLEM:

Repeat the example above.

OTHER COMMENTS:

The fix is _trivial_:

Instead of launching the program with $* , use "$@" as the last line in
run-standalone.sh (applies to both SDK and N800, probably earlier/later
versions as well).

After this three-character fix, parameter boundaries are preserved through
run-standalone.sh.
Comment 1 Aleksandr Koltsoff (reporter) 2007-10-13 12:38:46 UTC
You might also want to prepend the launch with 'exec ' (since the launch is the
last action for the script and keeping the shell running for the duration of
the launched program gains nothing in this case).
Comment 3 Aleksandr Koltsoff (reporter) 2007-10-18 19:28:37 UTC
For great victory! Seriously though, no exec? :-).
Comment 4 Aleksandr Koltsoff (reporter) 2007-11-13 02:00:31 UTC
Fixed in 4.0 release SDK. closing (it still doesn't have the exec though).
Comment 5 Aleksandr Koltsoff (reporter) 2007-11-27 12:54:51 UTC
Works in 4.0 SDK properly. (does not include the exec still, but one can't have
the pie and eat it).
Comment 6 Jake Kunnari 2007-11-28 13:10:18 UTC
Closing. Resolution has been verified.