The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
after executing execvp()... program hangs up Crab High Level Programming 3 09-21-2006 07:31 AM
problem with dd command or maybe AFS problem Anta Shell Programming and Scripting 0 08-25-2006 07:10 AM
execvp:ar:Arg list too long -> while linking mohitp UNIX for Dummies Questions & Answers 1 05-03-2006 08:08 PM
execv () vs execvp () hurleyint1386 UNIX for Dummies Questions & Answers 3 10-31-2005 05:27 PM
execvp and execlp? abdul High Level Programming 1 09-04-2001 06:33 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-06-2005
Registered User
 

Join Date: Dec 2005
Posts: 2
Smile problem with execvp

i am having an application that contains a push button.
On the click of this push button i want to call a executable file using execvp

function block fo2 push button
{
char *args[1];
args[0]=NULL;
execvp("/home2/xyz/app1.exe",args)
}

but after compilation when i press this button the app1.exe is not being executed


help will be highly appreciated
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-07-2005
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,325
There is a problem with the way that you have called the exec syscall. Syntax is incorrect. For the correct syntax, check the man page.
Anyways, is the args variable always gonna be null? If so, call the exec as:
Code:
execl("/home2/xyz/app1.exe","app1.exe",0);
Reply With Quote
  #3 (permalink)  
Old 12-07-2005
Registered User
 

Join Date: Dec 2005
Posts: 2
still having problem with execvp

hi
thanks for reply
i tried
execl("/home2/xyz/app1.exe","app1.exe",0);
but it is still not working
Reply With Quote
  #4 (permalink)  
Old 12-07-2005
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,325
What error are you getting? Check the value of the "errno" variable that is set when the system call returns. This will help you get closer to your solution.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0