Thread: double-click C executable.
03-31-2007, 04:37 AM #1
double-click C executable.
- Member Since
- Mar 28, 2007
I don't have a Mac, so I need your help here. If, on Mac OS X, one write some C code, then compiles it with
gcc -o binaryfile code.c
What if binaryfile doesn't have execute permissions set? What happens whet it gets double clicked?
Thanks for help.
03-31-2007, 07:13 PM #2
- Member Since
- Jun 25, 2005
- On the road
- 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
From the Finder, it will execute as expected if it has execute permissions set. If Terminal is not open, then it is first opened to the users home directory. Upon exit of the executable, the terminal exits the shell and leaves a message saying "[Process completed]".
If the file does not have execute permission, Terminal is still opened and is left in the users home directory at a live prompt.
When the user is already has the Terminal opened and tries to execute a file without execute permission, the user gets a Permission denied" error.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By SleeperSS in forum Apple DesktopsReplies: 3Last Post: 08-16-2014, 08:29 PM
By Calistoga in forum OS X - Operating SystemReplies: 7Last Post: 11-06-2011, 08:50 PM
By jhigga15 in forum OS X - Apps and GamesReplies: 3Last Post: 09-11-2010, 07:29 PM
By Coopers in forum Apple NotebooksReplies: 2Last Post: 11-12-2009, 07:35 PM
By soundsystem00 in forum Switcher HangoutReplies: 16Last Post: 03-25-2008, 10:00 PM