The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
execlp to sort the_learner High Level Programming 4 11-29-2007 01:50 AM
after executing execvp()... program hangs up Crab High Level Programming 3 09-21-2006 10:31 AM
execvp:ar:Arg list too long -> while linking mohitp UNIX for Dummies Questions & Answers 1 05-03-2006 11:08 PM
problem with execvp kunu UNIX for Dummies Questions & Answers 3 12-07-2005 10:32 AM
execv () vs execvp () hurleyint1386 UNIX for Dummies Questions & Answers 3 10-31-2005 09:27 PM

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 09-02-2001
abdul abdul is offline
Registered User
  
 

Join Date: Aug 2001
Posts: 10
execvp and execlp?

Hi mates,

Is there any difference between execvp and execlp? any comment will be appreciated.

abdul
  #2 (permalink)  
Old 09-04-2001
Perderabo's Avatar
Perderabo Perderabo is online now Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,119
With execvp you need an argv array already built. So a program like:
Code:
#include "stdlib.h"  /** vb is eating my angle brackets **/
main(argc,argv)
int argc;
char **argv;
{
      execvp(*++argv, argv);
}
will simply pass its arguments to execvp.

With execlp you do stuff like:
execlp("echo", "echo", "one", "two", NULL);
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 12:17 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