2 ms·
system() in general is incorrect, there are much better ways to run other programs, like posix_spawn, fork+exec, libpipeline etc.
by pabs3 6y ago
system() in general is incorrect, there are much better ways to run other programs, like posix_spawn, fork+exec, libpipeline etc.
- a1369209993 6y agoFor a non-constant argument, sure, but I was talking about the malformed string literal.
- pabs3 6y agoEven for a constant argument; it is better to just start the program than to start the shell and tell it to start the program like system() does. Ack about the string literal.