This page is now deprecated! You can get the latest information about First Wednesdays from our new Meetup group: http://bit.ly/cville-fw
#import <Carbon/Carbon.h> | |
#import <dlfcn.h> | |
/* | |
* Returns an array of CFDictionaryRef types, each of which contains information about one of the processes. | |
* The processes are ordered in front to back, i.e. in the same order they appear when typing command + tab, from left to right. | |
* See the ProcessInformationCopyDictionary function documentation for the keys used in the dictionaries. | |
* If something goes wrong, then this function returns NULL. | |
*/ | |
CFArrayRef CopyLaunchedApplicationsInFrontToBackOrder(void) |
The segfault problem with posix_spawn is indeed caused by Lion's compiler being LLVM and not GCC by default. However, when I installed RVM, the notes suggested that on Lion you need to add export CC=/usr/bin/gcc-4.2
to your shell startup file (.bashrc
or .zshrc
as appropriate). I did that, but it seems that's what caused problems: while ruby 1.9.2 needs you to use GCC to install it, using the same compiler for the gems apparently causes breakage.
First, you need to install XCode 4.x, which is now a free (though hefty!) download from the Mac App Store. Without that, you have no gcc, so you won't get anywhere ;-)
Next, what you need to do is clear out your rvm ruby and the associated gems (make sure you are cd'd into your octopress repository then do:
rvm remove ruby-1.9.2 --gems --archive
which will clear everything out so that you can start from scratch. Obviously, if you have other stuff you've installed for other purposes using RVM, be careful with this. If you previously had the export CC li