我想从特定用户的根进程启动可可应用程序。所以我正在更改我的应用程序的所有者和权限。
如果 s 权限组设置了用户位(对应于 u+s),那么无论何时任何人执行该程序,该进程都会获得拥有它的人的权限。
sudo chown -R test myApp
sudo chmod u+s /Contents/MacOS/myApp
system([@"open myApp" UTF8String]); //inside root process
//-rwsr-xr-x 1 test myApp
错误:
com.apple.launchd[1]: System: Bug: launchd_core_logic.c:8760 (24498):0
com.apple.launchd[1]: System: job_mig_spawn() can't find its session!
open[24459]: spawn_via_launchd() failed, errno=5 label=[0x0-0x274274].
rootProcess[23127]: LSOpenURLsWithRole() failed with error -10810 for the file /Applications/myApp.app/.
谁能帮帮我?