2019-07-28 10:31:56 +08:00
|
|
|
|
// proctlc.cpp : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̨Ӧ<CCA8>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ㡣
|
2014-11-19 00:25:21 +08:00
|
|
|
|
//
|
|
|
|
|
#pragma comment(lib,"ws2_32")
|
|
|
|
|
#include "lib_acl.h"
|
|
|
|
|
|
|
|
|
|
static void onexit_fn(void *arg acl_unused)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
acl_socket_init();
|
|
|
|
|
acl_msg_open("debug.txt", "proctlc");
|
|
|
|
|
acl_msg_info(">>> in child progname(%s), argc=%d\r\n", argv[0], argc);
|
|
|
|
|
if (argc > 1)
|
|
|
|
|
acl_msg_info(">>> in child progname, argv[1]=(%s)\r\n", argv[1]);
|
|
|
|
|
acl_proctl_child(argv[0], onexit_fn, NULL);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < argc; i++) {
|
|
|
|
|
acl_msg_info(">>>argv[%d]:%s\r\n", i, argv[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
|
while (1) {
|
|
|
|
|
acl_msg_info("i = %d\r\n", i++);
|
|
|
|
|
if (i == 5)
|
|
|
|
|
sleep(1);
|
|
|
|
|
else
|
|
|
|
|
sleep(1);
|
|
|
|
|
}
|
2019-07-28 10:31:56 +08:00
|
|
|
|
return (-1); // <20><><EFBFBD><EFBFBD> -1 <20><>Ϊ<EFBFBD><CEAA><EFBFBD>ø<EFBFBD><C3B8><EFBFBD><EFBFBD>̼<EFBFBD><CCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
|