Hacker News new | past | comments | ask | show | jobs | submit login

Great heavens! I assumed at first that your "dlopen" was a separate executable, but you are implying you allow calling arbitrary C functions within the memory space of the bash process itself!?



Yes, exactly... :)

You can also create callbacks (i.e. function pointers to bash code) that you can pass to qsort() or bsearch()... or pthread_create? That last one was a joke, I mean, you probably could but I don't know what would happen - I don't think bash is reentrant :)


Wow, I thought the original article was awful tho good, then I saw the lseek goto which seems much worse, then I see this dlopen for bash and I find it's the worse. But impossibly cool.

Did you have a usecase for this or it was just fun?




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

Search: