apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Ince" <si...@opendemand.com>
Subject Re: exec a process.
Date Fri, 13 Mar 2009 13:59:32 GMT
I just one final issue. I can't seem to get relative paths to work for 
apr_proc_create. Absolute path works great.
I have also tried using apr_filepath_root to get the canonical but I can't 
seem to get it work either.

I have tried the following.

    // this fails. openload.exe is actually the program itself (it is in the 
same directory).  (/openload/bin/openload.exe works )
    args[0] = exec_name;
    args[1] = url->arg;
    args[2] = NULL;
    status = apr_proc_create(&newproc, exec_path, args, NULL, attr, pool);

Is there a way for "apr_proc_create" to use relative paths for an 
executeable or get the canonical path for an executeable?
I am testing on win32. Any help would be greatly appreciated.


----- Original Message ----- 
From: "Eric Covener" <covener@gmail.com>
To: "APR Development" <dev@apr.apache.org>
Sent: Wednesday, March 11, 2009 12:16 PM
Subject: Re: exec a process.

> On Wed, Mar 11, 2009 at 12:08 PM, Stephen Ince <since@opendemand.com> 
> wrote:
>> Is there a portable way to exec a file within the apr?
>> I noticed that apr_proc_fork is not portable.
>> I basically want to do the following.
>> #setup stdin and stdout.
>> exec("/my file") in a separate process.
>> #wait for the process.
> apr_procattr_* is available:
> http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_thread_proc.h?view=co
> http://svn.apache.org/viewvc/apr/apr/trunk/test/testproc.c?view=co
> -- 
> Eric Covener
> covener@gmail.com

View raw message