Thread: Exec'ing a file

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    87

    Exec'ing a file

    Ok say I had a few .c files all in the following dir

    /home/user/src/ls/ls.c
    /home/user/src/cd/cd.c
    /home/user/src/pwd/pwd.c
    /home/user/src/ps/ps.c
    /home/user/src/kill/kill.c

    And they all were compiled and had their own a.out files, If I wanted to execute them within a different file how would I use the execv function.

    Would it be something similar to

    execv("//home/user/src/ls/a.out",argv[]);
    PuterPaul.co.uk - Portfolio site

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  2. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  3. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM