2 ms·
> are not drop-in replacements since they don't take care of forking, changing the signals, and waiting. I never claimed it as a drop-in replacement. I think
by asveikau 12y ago
> are not drop-in replacements since they don't take care of forking, changing the signals, and waiting.
I never claimed it as a drop-in replacement. I think you know the solution to these problems. (I guess maybe someone who naively uses system() might not, so perhaps I need to work on a better spiel.)
> As long as you're not passing arguments from outside sources to the command, using system() should be OK.
Personally I've seen too many bad uses of system() to make that a thing. Maybe they'll not realize it's subject to PATH and that PATH can be untrusted. Maybe they'll not realize they sometimes have asterisks and spaces in a filename. And so forth...