diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-03-01 14:27:32 -0500 | 
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-03-01 14:27:32 -0500 | 
| commit | 22fcb563ce45e64f23c9911bdcd07b0086bc892a (patch) | |
| tree | bcbc3684ea9771a3063d5888bfeab706132f1001 /indra/llcommon | |
| parent | 2596816f316e13b717bcdacddad0da48c90c3b6d (diff) | |
Log better error message in case of apr_proc_create() failure.
We were using uniform macro to report the APR function and its C++ parameter
expressions. But specifically for apr_proc_create() failure, better to report
the command we're attempting to execute.
Diffstat (limited to 'indra/llcommon')
| -rw-r--r-- | indra/llcommon/llprocess.cpp | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp index 8ccd39152b..9c49517598 100644 --- a/indra/llcommon/llprocess.cpp +++ b/indra/llcommon/llprocess.cpp @@ -617,8 +617,14 @@ LLProcess::LLProcess(const LLSDOrParams& params):  	// terminate with a null pointer  	argv.push_back(NULL); -	// Launch! The NULL would be the environment block, if we were passing one. -	chkapr(apr_proc_create(&mProcess, argv[0], &argv[0], NULL, procattr, gAPRPoolp));     +	// Launch! The NULL would be the environment block, if we were passing +	// one. Hand-expand chkapr() macro so we can fill in the actual command +	// string instead of the variable names. +	if (ll_apr_warn_status(apr_proc_create(&mProcess, argv[0], &argv[0], NULL, procattr, +										   gAPRPoolp))) +	{ +		throw LLProcessError(STRINGIZE(params << " failed")); +	}  	// arrange to call status_callback()  	apr_proc_other_child_register(&mProcess, &LLProcess::status_callback, this, mProcess.in, | 
