Solved

Mac methods for create process

Posted on 2003-10-22
4
765 Views
Last Modified: 2013-12-26
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
Comment
Question by:neele
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 23

Expert Comment

by:brettmjohnson
ID: 9604642
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
 
LVL 2

Author Comment

by:neele
ID: 9604759
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
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 50 total points
ID: 9604805
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
 
LVL 2

Author Comment

by:neele
ID: 9604848
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

 Watch the Recording: Learning MySQL 5.7

MySQL 5.7 has a lot of new features. If you've dabbled with an older version of MySQL, it is definitely worth learning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question