sl@van-bc.UUCP (Stuart Lynne) (04/24/87)
I need a call similiar to the unix "system" to put into a uucp program to do the uuxqt part. Has anyone out there in netland gotten around to implementing a method of calling another program with proper return to the calling program when finished? For example similiar to the unix "system" call. Do any of the Mac C compilers have this type of a routine. I'm using Aztec, and have check MPW, neither seem to have it. Aztec does have exec in various forms, but really just gives you chaining. -- Stuart Lynne ihnp4!alberta!ubc-vision!van-bc!sl Vancouver,BC,604-937-7532
jww@sdcsvax.UCSD.EDU (Joel West) (04/26/87)
In article <663@van-bc.UUCP>, sl@van-bc.UUCP (Stuart Lynne) writes: > I need a call similiar to the unix "system" to put into a uucp > program to do the uuxqt part. the way to do this is to: 1. Find out who's the current 'Finder' and save the name 2. Make your program the current finder. 3. _Chain to the program. 4. Wait to come back. I've not done it myself, so I don't know whether you want _Launch or _Chain (i.e., when you come back, your heap might not be re-initialized if you try _Chain, but I'm not sure). This is what the MPW shell does when you run an application, and it looked like what the Aztec shell does, too. -- Joel West {ucbvax,ihnp4}!sdcsvax!jww (ihnp4!gould9!joel once I fix news) jww@sdcsvax.ucsd.edu if you must
mark@hyper.UUCP (04/27/87)
in article <663@van-bc.UUCP>, sl@van-bc.UUCP (Stuart Lynne) says: > Posted: Fri Apr 24 03:17:39 1987 > > Has anyone out there in netland gotten around to implementing > a method of calling another program with proper return to the > calling program when finished? For example similiar to the > unix "system" call. Switcher provides this kind of capability. LightSpeed C uses it to run your program in a private partition and then return to LSC instantly. Get a hold on a copy of "Inside Switcher". -- Mark G. Mendel, ihnp4!umn-cs!hyper!mark, Network Systems Corporation All opinions expressed herein, even the most arbitrary, are defended by my employer with religious fervor.
tomas@apple.UUCP (04/27/87)
In article <3042@sdcsvax.UCSD.EDU> jww@sdcsvax.UCSD.EDU (Joel West) writes: >In article <663@van-bc.UUCP>, sl@van-bc.UUCP (Stuart Lynne) writes: >> I need a call similiar to the unix "system" to put into a uucp >> program to do the uuxqt part. > >the way to do this is to: > 1. Find out who's the current 'Finder' and save the name > 2. Make your program the current finder. > 3. _Chain to the program. > 4. Wait to come back. > >I've not done it myself, so I don't know whether you want _Launch >or _Chain (i.e., when you come back, your heap might not be >re-initialized if you try _Chain, but I'm not sure). > >This is what the MPW shell does when you run an application, and >it looked like what the Aztec shell does, too. >-- > Joel West > {ucbvax,ihnp4}!sdcsvax!jww (ihnp4!gould9!joel once I fix news) > jww@sdcsvax.ucsd.edu if you must This is NOT the way the MPW Shell does it. Tom Taylor / Development Systems Group
lsr@apple.UUCP (04/27/87)
In article <3042@sdcsvax.UCSD.EDU> jww@sdcsvax.UCSD.EDU (Joel West) writes: >In article <663@van-bc.UUCP>, sl@van-bc.UUCP (Stuart Lynne) writes: >> I need a call similiar to the unix "system" to put into a uucp >> program to do the uuxqt part. > >the way to do this is to: > 1. Find out who's the current 'Finder' and save the name > 2. Make your program the current finder. > 3. _Chain to the program. > 4. Wait to come back. I have good news and bad news. The good news is that there is a much easier way to do this. The more recent systems support a sublaunch protocol, which allows one program to launch another and regain control when the other program finishes. It does not require changing low memory globals. There is an extended set of parameters to the Launch call that indicates is a sublaunch is desired. The bad news? You will have to wait a couple of weeks to get the full details. The reason is that this feature is going to be documented in the next set of Tech Notes, which are due to be distributed in a couple of weeks. I am one of the Tech Note reviewers, which is why I know about this. Unfortunately, I returned my review copy, so I don't have the exact details around. (Plus, I would prefer to wait for the official Tech Note release, just in case the review copy had errors.) I will post the information as soon as I get it. (Although given the way Tech Notes are distributed, people outside Apple will probably see them first.) -- Larry Rosenstein Object Specialist Apple Computer AppleLink: Rosenstein1 UUCP: {sun, voder, nsc, mtxinu, dual}!apple!lsr CSNET: lsr@Apple.CSNET