Executing shell script with system() returns 256. What does that mean?

前端 未结 4 1166
一向
一向 2020-12-01 11:08

I\'ve written a shell script to soft-restart HAProxy (reverse proxy). Executing the script from the shell works. But I want a daemon to execute the script. That doesn\'t wor

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 11:23

    According to this and that, Perl's system() returns exit values multiplied by 256. So it's actually exiting with 1. It seems this happens in C too.

提交回复
热议问题