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 11:31 AM
problem with dd command or maybe AFS problem Anta Shell Programming and Scripting 0 08-25-2006 11:10 AM
execvp:ar:Arg list too long -> while linking mohitp UNIX for Dummies Questions & Answers 1 05-04-2006 12:08 AM
execv () vs execvp () hurleyint1386 UNIX for Dummies Questions & Answers 3 10-31-2005 09:27 PM
execvp and execlp? abdul High Level Programming 1 09-04-2001 10:33 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-07-2005
kunu kunu is offline
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
  #2 (permalink)  
Old 12-07-2005
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
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);
  #3 (permalink)  
Old 12-07-2005
kunu kunu is offline
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
  #4 (permalink)  
Old 12-07-2005
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0