Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On OS X:

    gcc stderred.c -D_GNU_SOURCE -Wall -ldl -fPIC -shared -o lib/stderred.dyld
    alias stderred='DYLD_INSERT_LIBRARIES=$PWD/lib/stderred.dyld DYLD_FORCE_FLAT_NAMESPACE=1'
    stderred python -c 'import os; print "Yo!"; os.write(2, "Jola\n\r")'
(replace $PWD with the absolute path if you're adding this to your shell config, of course)


Cool, looks like the same gcc flags works for OSX.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: