MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / system

Function system

components/libc/compilers/common/cstdlib.c:52–62  ·  view source on GitHub ↗

* @brief Execute a command using the Micro-Shell (MSH) subsystem. * * @param command is the command string to execute. * * @return Returns 0 after executing the command. */

Source from the content-addressed store, hash-verified

50 * @return Returns 0 after executing the command.
51 */
52int system(const char *command)
53{
54 extern int msh_exec(char *cmd, rt_size_t length);
55
56 if (command)
57 {
58 msh_exec((char *)command, rt_strlen(command));
59 }
60
61 return 0;
62}
63RTM_EXPORT(system);
64#endif /* RT_USING_MSH */
65

Callers

nothing calls this directly

Calls 2

msh_execFunction · 0.85
rt_strlenFunction · 0.85

Tested by

no test coverage detected