Thread: C++ Program Running on Unix

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    2

    C++ Program Running on Unix

    Good day to everyone.

    I would like to know how to "call" a unix program using C++.

    Any info is greatly appreciated.

    Thanks...

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    open up a terminal and type `man 3 system`

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Or just check the FAQ
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    2

    Acknowledged

    Thanks...


    Being a newbie is hard...

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    22
    Quote Originally Posted by UlyssesVien
    Thanks...


    Being a newbie is hard...
    Being newbie doesn't mean to have everyone else do the research and work for you.

    You'll never get anywhere if you have to have your hand held for such trivial "problems".

  6. #6
    Unregistered User
    Join Date
    Sep 2005
    Location
    Antarctica
    Posts
    341
    system()

  7. #7
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275
    Hi

    But fork() then exec() is prefered to system()

  8. #8
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by fnoyan
    Hi

    But fork() then exec() is prefered to system()
    neither of which are standard functions.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  9. #9
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Quote Originally Posted by major_small
    neither of which are standard functions.
    They are standard to posix which is pretty standard on most distros

  10. #10
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    posix is the standard for unix libs.
    if a function is in the posix libs then it will be on any unix like system, other than windows nt.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Finding Program Running Time
    By pf732k3 in forum C Programming
    Replies: 6
    Last Post: 03-18-2008, 01:56 PM
  2. Stop program from running twice?
    By Abda92 in forum C Programming
    Replies: 19
    Last Post: 03-17-2008, 01:35 PM
  3. Determaining if a program is running
    By WebmasterMattD in forum Linux Programming
    Replies: 4
    Last Post: 04-09-2002, 04:36 PM
  4. Why is my program running away?
    By badkitty in forum C++ Programming
    Replies: 4
    Last Post: 09-19-2001, 04:27 PM
  5. Running program
    By muffin in forum C Programming
    Replies: 5
    Last Post: 08-30-2001, 10:57 AM