diff --git a/src/README b/src/README index 0ec4cfa..6d74ce1 100644 --- a/src/README +++ b/src/README @@ -1,3 +1,8 @@ +--V1.11 -- +2015-12-18 +添加在程序开始时对IPC变量是否已存在的判断,如果已存在,则将其删除。 +将宏TESTINTERVAL的定义去除,不然不会调用南瑞的库函数。 + --V1.10 -- 2015-12-11 修改IPC信号量的相关操作 diff --git a/src/sys_nicmonitor#1.10-x86_64-Linx-Rocky4.2.pkg.tar.gz b/src/sys_nicmonitor#1.10-x86_64-Linx-Rocky4.2.pkg.tar.gz deleted file mode 100644 index 2151700..0000000 Binary files a/src/sys_nicmonitor#1.10-x86_64-Linx-Rocky4.2.pkg.tar.gz and /dev/null differ diff --git a/src/sys_nicmonitor/README b/src/sys_nicmonitor/README index 0ec4cfa..6d74ce1 100644 --- a/src/sys_nicmonitor/README +++ b/src/sys_nicmonitor/README @@ -1,3 +1,8 @@ +--V1.11 -- +2015-12-18 +添加在程序开始时对IPC变量是否已存在的判断,如果已存在,则将其删除。 +将宏TESTINTERVAL的定义去除,不然不会调用南瑞的库函数。 + --V1.10 -- 2015-12-11 修改IPC信号量的相关操作 diff --git a/src/sys_nicmonitor/mnic.c b/src/sys_nicmonitor/mnic.c index 1783055..dd1457f 100644 --- a/src/sys_nicmonitor/mnic.c +++ b/src/sys_nicmonitor/mnic.c @@ -1474,6 +1474,16 @@ int do_alarm(NETCARD_INFO_ST *listp, int nic_status, D5000_NIC_ALARM *Malarm) int main(int argc, char ** argv) { + int id = -1; + if((id = semget(0x1d5200, 1, 0666)) == -1) + semctl(id,0,IPC_RMID,0); + id = -1; + if((id = shmget(0x1d5010,sizeof(SHM) + 16 , 0666)) == -1) + semctl(id,0,IPC_RMID,0); + id = -1; + if((id = shmget(0x1d6010, 128, 0666)) == -1) + semctl(id,0,IPC_RMID,0); + int ret = 0, proc_stat = 0; unsigned int i = 0; int nic_status; @@ -1499,7 +1509,7 @@ int main(int argc, char ** argv) struct sigaction sig; struct passwd *user; -#define TESTINTERVAL +//#define TESTINTERVAL #ifndef TESTINTERVAL proc_invocation prcm; #endif diff --git a/src/sys_nicmonitor/version.h b/src/sys_nicmonitor/version.h index 3492d46..f849540 100644 --- a/src/sys_nicmonitor/version.h +++ b/src/sys_nicmonitor/version.h @@ -1,5 +1,5 @@ -// version=1.10 +// version=1.11 #ifndef MNIC_VERSION - #define MNIC_VERSION "1.10" + #define MNIC_VERSION "1.11" #endif