PDA

View Full Version : calling system return permission denied, why?




jpopop
Jun 26, 2011, 05:57 AM
On Mac 10.7, calling function system with parameter "open -a /Volumes/A/A.app" in my code in C language, system function return error: permission denied.but it works fine on Mac 10.6.
why? account rights managment change somthing on MAC 10.7?

thx:confused:



jiminaus
Jun 26, 2011, 07:22 AM
Can't talk about Lion, NDA.

But even under SL, that open command seems invalid. If you include the -a option then you're saying, open file x using app a. But you've only given app a, not file x. If you trying to run the app mounted in volume A, then I don't think you want the -a.

kainjow
Jun 26, 2011, 02:47 PM
You really should be using LSOpenApplication() to launch apps instead anyways.