View | Details | Raw Unified | Return to bug 894
Collapse All | Expand All

(-)a/wutils.py (-4 / +7 lines)
 Lines 121-127    Link Here 
121
121
122
    return proc_env
122
    return proc_env
123
123
124
def run_argv(argv, env, os_env=None, cwd=None, force_no_valgrind=False):
124
def run_argv(program_string, argv, env, os_env=None, cwd=None, force_no_valgrind=False):
125
    proc_env = get_proc_env(os_env)
125
    proc_env = get_proc_env(os_env)
126
    if Options.options.valgrind and not force_no_valgrind:
126
    if Options.options.valgrind and not force_no_valgrind:
127
        if Options.options.command_template:
127
        if Options.options.command_template:
 Lines 149-155    Link Here 
149
            except WindowsError, ex:
149
            except WindowsError, ex:
150
                raise Utils.WafError("Command %s raised exception %s" % (argv, ex))
150
                raise Utils.WafError("Command %s raised exception %s" % (argv, ex))
151
    if retval:
151
    if retval:
152
        raise Utils.WafError("Command %s exited with code %i" % (argv, retval))
152
        if retval == -11:
153
            raise Utils.WafError('Your program crashed with exit code -11 (Segmentation fault). Run it under a debugger to get more information. For example, with gdb, type:\n./waf --command-template="gdb %s" --run "%s"' % ("%s", program_string))
154
        else:
155
            raise Utils.WafError("Command %s exited with code %i" % (argv, retval))
153
    return retval
156
    return retval
154
157
155
def get_run_program(program_string, command_template=None):
158
def get_run_program(program_string, command_template=None):
 Lines 210-216    Link Here 
210
            cwd = Options.options.cwd_launch
213
            cwd = Options.options.cwd_launch
211
        else:
214
        else:
212
            cwd = Options.cwd_launch
215
            cwd = Options.cwd_launch
213
    return run_argv(execvec, env, cwd=cwd)
216
    return run_argv(program_string, execvec, env, cwd=cwd)
214
217
215
218
216
219
 Lines 221-226    Link Here 
221
        cwd = Options.options.cwd_launch
224
        cwd = Options.options.cwd_launch
222
    else:
225
    else:
223
        cwd = Options.cwd_launch
226
        cwd = Options.cwd_launch
224
    return run_argv([env['PYTHON']] + execvec, env, cwd=cwd)
227
    return run_argv(program_string, [env['PYTHON']] + execvec, env, cwd=cwd)
225
228
226
229

Return to bug 894