~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to lib/common/console.py

  • Committer: wagrant
  • Date: 2008-09-12 23:21:50 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1046
common.console: Use os.spawnv rather than os.system to launch
                trampoline, as it is both a security risk and
                prone to breakage with spaces in paths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
            # Start the console server (port, magic)
172
172
            # trampoline usage: tramp uid jail_dir working_dir script_path args
173
173
            # console usage:    python-console port magic
174
 
            cmd = ' '.join([
 
174
            res = os.spawnv(os.P_WAIT, trampoline_path, [
175
175
                trampoline_path,
176
176
                str(self.uid),
177
177
                self.jail_path,
183
183
                self.working_dir
184
184
                ])
185
185
 
186
 
            res = os.system(cmd)
187
 
 
188
186
            if res == 0:
189
187
                # success
190
188
                break;