Advertisement

03.23.2008 at 08:37PM PDT, ID: 23263378
[x]
Attachment Details

execl program without finding its relative file

Asked by TKD in C Programming Language, Linux Programming

Tags: C, Linux

Hi,
I can execute the specified program 'cpeserver'  in the '/home/james/gsoap-linux-2.7/samples/cpeserver' directory. The program uses a database.
Now, I call the execl function to execute the specified program. I change my working directory to 'tmp' and execute below program. The program '/home/james/gsoap-linux-2.7/samples/cpeserver/cpeserver' can be executed, but the system tells me that it can't find the used database.
The used database is at the same directory as the cpeserver program. I don't know why it can't find that. What should I do?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
#include <stdio.h>
#include <unistd.h>
 
int main()
{
        execl("/home/james/gsoap-linux-2.7/samples/cpeserver/cpeserver", "10000", (char *) NULL);
        return 0;
}
 
 
Loading Advertisement...
 
[+][-]03.24.2008 at 12:20AM PDT, ID: 21192273

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.24.2008 at 03:19AM PDT, ID: 21192654

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.24.2008 at 06:10PM PDT, ID: 21198832

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.25.2008 at 01:29AM PDT, ID: 21200215

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.26.2008 at 11:00PM PDT, ID: 21218905

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.26.2008 at 11:44PM PDT, ID: 21219053

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.27.2008 at 02:08AM PDT, ID: 21219570

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: C Programming Language, Linux Programming
Tags: C, Linux
Sign Up Now!
Solution Provided By: Infinity08
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.31.2008 at 02:17AM PDT, ID: 21244053

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.03.2008 at 06:28PM PDT, ID: 21278435

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628