how to call another application in a application?

Discussion in 'Mac Programming' started by chidambaram, Apr 11, 2008.

  1. macrumors member

    Joined:
    Mar 9, 2008
    #1
    hi all,

    I am working in a carbon c++ application using XCode in MAC machine.

    I have two carbon c++ applications(for example,name of applications are get and set)

    In first application(get.xcodeproject),
    on button click event how can i call second application(set.xcodeproject)


    Thanks in advance and very urgent plz....
     
  2. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    Fork and exec are the traditional way of doing this sort of thing.

    You can call system() to run another program as well, but you will have to wait for the second command to finish.

    Dependent on what you need vfork might be best since you intend to run a completely different program and probably don't need to retain the process space of the parent program.

    man on any of these for more info.

    -Lee
     
  3. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #3
    I highly recommend you pick up a copy of Stevens' Advanced Programming in the UNIX Environment.

    It's the standard reference for all the "system" programming tasks, like fork and exec. It also covers threads, sockets, IPC, pseudo-terminals, etc.
     

Share This Page