Greeting all.
How can achieve next:
Is it possible to achive with RabbitMQ?
Could you get me some advice, please?
Thank very much for your help.
You need to use the system
C stdlib call to do this. There's some other relevant SO questions that can help you with this. Try help on this one on executing shell built-ins and this one on system . You can also man system
and man execv
.
Parse your queue message, craft a char *
or string
object with the command that needs to execute based on the queue message, and then pass it to system
. See this SO question for help on the return code from system
if you're not getting it based on the man page.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.