Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 817
  • Last Modified:

Mac methods for create process

Hello

1)Does anyone knows how to use c/c++ to create/call process on MAC?
Windows we can use spawn but not mac...

2) Is the function CALLBACK "usable" on MAC or isit Windows Specific

3) The method System and Execl can still be use on MAC ?
If yes is it on any version of MAC?

I need it on MAC OS X and Mac OS 9.

Thanks
0
neele
Asked:
neele
  • 2
  • 2
1 Solution
 
brettmjohnsonCommented:
Mac OS X supports the POSIX standard interfaces to at the BSD Unix APIs.
Processes are created with system(), popen(), fork(), vfork(), and execl() et al.

The effect of spawn() on windows, is accomplished with vfork() immediatedly
followed by exec().

CALLBACK is not so much a function, as it is and attribute of a function on Windows
that specifies calling conventions for callbacks from DLLs.  CALLBACK instructs the
function to restore the data segment registers.  AFAIK, this is unnecessary in Unix.

Alternatively you can use the Cocoa CFBundle* set of APIs to load executables and
shared libraries.

I don't know anything about Mac OS 9 or Carbon APIs
0
 
neeleAuthor Commented:
Hmm u answer me tat before in C++ section.
But i still unable to find how to create process in MAC OS 9..;c

I know can use fork n exec on MAC OS X since is build on Unix..
But OS 9 is not so...i need to find out..on tat. else..it won't work.

I need to clearly KNOW whether
system(), LRESULT CALLBACK, can work on MAC..etc and my above post question

there is too many thing i dunno abt mac n c++ ;o
 
0
 
brettmjohnsonCommented:
Well all the Darwin, BSD, Cocoa, and Carbon documentation is available
on Apple's website.  The Carbon APIs are the ones that work in Mac OS 9.
Although I cannot imagine why you want to port a new application to OS 9.
Anyway, here is the Carbon Process Mgmt documentation:

http://developer.apple.com/documentation/Carbon/ProcessManagement-date.html

0
 
neeleAuthor Commented:
ok i will go have a look ..but there is too much documentation for me to filter tat y i need "short cut" if someone can answer my question.

Not actually porting a new app to OS 9. Building a plugin for mac thus need it to be able to be used on mac os 9 and mac os x...so i need to have code for both version am i right??
so can replace...like if os x use A os 9 use B.. Am i right? ;o
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now