Re:Libc on macOS invokes Perl as a subprocess for string pro...
by w0utert on Wednesday January 16, 2019 @11:25AM
(#18922172)
But why? Looking at the wordexp synopsis it doesn't seem like a particularly advanced function. Why don't the various libc's just implement this function directly in C?
[ Parent
| on HN ]
Re:Libc on macOS invokes Perl as a subprocess for string pro...
by anyfoo on Wednesday January 16, 2019 @03:16PM
(#18924641)
Because it's literally meant to perform shell style substitution, with all the myriad of expansions that the shell supports. Similarly to system(), which also passes its input to the shell, it's never safe to use with untrusted input. (The man-page says so.)