2 ms·
Personally I like this approach from netbsd much better, it's not ripped-out, just disabled by default. Though it would be nice if there was a single char shopt
by mzs 12y ago
Personally I like this approach from netbsd much better, it's not ripped-out, just disabled by default. Though it would be nice if there was a single char shopt so set, $-, and shebangs could all work with it, but then again it might be such a rare (and somewhat questionable) thing to export functions that it's a good idea just to leave it like this with only a longopt. Might force people to think about it some and use /usr/bin/env foo=bar ... - /bin/bash now, or just do the system(exec ... like I had above. But changing the shebang would be simplest, something like #!/bin/sh -g for the scripts that need it. And yes I had to deal with code like this doing exporting functions from perl and C in the past, it was for gross reasons to emulate older systems poorly.
http://seclists.org/oss-sec/2014/q3/755 http://seclists.org/oss-sec/2014/q3/755