Solved

Mac methods for create process

Posted on 2003-10-22
4
721 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 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

13 Experts available now in Live!

Get 1:1 Help Now