Solved

Mac methods for create process

Posted on 2003-10-22
4
726 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now