Newsgroups: comp.unix.aux Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!aurora.physics.utoronto.ca!sysmark From: sysmark@physics.utoronto.ca (Mark Bartelt) Subject: MacOS => A/UX porting woes Message-ID: <1991Mar13.141628.22733@helios.physics.utoronto.ca> Originator: sysmark@aurora.physics.utoronto.ca Sender: news@helios.physics.utoronto.ca (News Administrator) Nntp-Posting-Host: aurora.physics.utoronto.ca Reply-To: sysmark@cita.utoronto.ca Organization: University of Toronto Physics/Astronomy/CITA Date: Wed, 13 Mar 1991 14:16:28 GMT We recently installed A/UX on one of our MacII systems, and the person who uses this Mac is having trouble porting one of his Mac applications to run under A/UX. I confess to not knowing much about the Mac environment, so I may be leaving out relevant details. Anyway, here goes a first pass at a description of the problem, though it's rather hard to know exactly what details one might need to make a pass at diagnosing it ... He has an application that he wrote himself, and has used for quite some time under MacOS (where he used Think-C to compile his stuff). After some minor fiddling to remove function prototypes so that A/UX cc would accept the program as valid, it compiles/loads just fine. The program launches and runs OK, whether invoked by double-clicking its icon, or run from a command shell. If he lets it exit normally, all seems well. The problems occur when he tries to run a desk accessory. Or clicks the finder's icon in the upper-right corner of the screen. Or clicks in some other window on the desktop. When he does any of these things while his program is running, everything hangs catastrophically (keyboard input and mouse clicks are ignored). Things are so thoroughly hung, in fact, that the system has to be rebooted. After much puzzlement, he found that he can duplicate the problem in a much smaller program, fairly closely modeled after a test program that Apple provided in /mac/src/something as an example. What he's found is: Apple's test program compiles and runs just fine if compiled with A/UX cc. In other words, one can do other things (like starting a DA) while the test program is running. However, the test program misbehaves in the same way as his program if it's compiled with gcc! (His program, for what it's worth, misbehaves whether it's compiled with gcc or A/UX cc.) Short of posting the complete source code for his program and having you all take a look at it (something which I'm *sure* you're incredibly eager to do), I can't think of anything else that may be relevant. Oh, yeah, he is running in 32-bit mode, if that makes any difference. He's a bit surprised by all this (as am I), not so much by the fact that his program doesn't work (after all, it may be buggy in some weird way that just never showed up under MacOS), but by the fact that it's possible to hang the entire system when running under A/UX. We'd both been under the impression that A/UX ran user processes in a protected mode, so that, as with other UNIXes, a buggy user-mode program could bugger itself but not hang/crash the system. Are we mistaken? Anyway, if anyone has a clue/pointer/suggestion as to what his program might be doing wrong (perhaps someone has encountered similar problems porting home-brew applications from MacOS to A/UX), I'd certainly enjoy hearing them. Thanks mucho. Mark Bartelt 416/978-5619 Canadian Institute for sysmark@cita.toronto.edu Theoretical Astrophysics sysmark@cita.utoronto.ca