This is source code from 2011. Checking http://opensource.apple.com will show that it's not longer implemented this way in 10.10.
Here's the current implementation: http://opensource.apple.com/source/Libc/Libc-1044.1.2/gen/Fr...
Here's the current implementation: http://opensource.apple.com/source/Libc/Libc-1044.1.2/gen/Fr...
https://github.com/freebsd/freebsd/blob/master/lib/libc/gen/...
It looks very similar to the current OSX file posted in an earlier comment. Calls /bin/sh too.
- this piece of code is 2BSD-licensed
- it calls out to /bin/sh
- on OS X, /bin/sh is hardlinked to /bin/bash
- OS X's bash is GPLv2
Forking to shell is the only way to reuse bash's code. More often than not I really wish sh were not bash.
well, the other obvius way is to license this piece of code as GPLv2.