summaryrefslogtreecommitdiffstats
path: root/src/libs/zbxsysinfo/common/common.c
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-25 13:36:21 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-25 13:36:21 +0000
commitdef54445e0927328542a4d1162ccfed99f962b86 (patch)
tree5e3070996266bc32f55f237f10febc57e7e141d4 /src/libs/zbxsysinfo/common/common.c
parent0b8329a1c06de8a4f426519daca06c9a7f9bc1bb (diff)
downloadzabbix-def54445e0927328542a4d1162ccfed99f962b86.tar.gz
zabbix-def54445e0927328542a4d1162ccfed99f962b86.tar.xz
zabbix-def54445e0927328542a4d1162ccfed99f962b86.zip
- added support of proc.mem[] for AIX (Eugene)
- added support of proc.num[] for AIX (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2780 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs/zbxsysinfo/common/common.c')
-rw-r--r--src/libs/zbxsysinfo/common/common.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libs/zbxsysinfo/common/common.c b/src/libs/zbxsysinfo/common/common.c
index b9e69297..a41fb485 100644
--- a/src/libs/zbxsysinfo/common/common.c
+++ b/src/libs/zbxsysinfo/common/common.c
@@ -520,10 +520,10 @@ int process(const char *in_command, unsigned flags, AGENT_RESULT *result)
} else i = 0;
i += strlen(usr_cmd);
-#define COLUMN_2_X 45 // max of spaces count
+#define COLUMN_2_X 45 /* max of spaces count */
i = i > COLUMN_2_X ? 1 : (COLUMN_2_X - i);
- printf("%-*.*s", i, i, " "); // print spaces
+ printf("%-*.*s", i, i, " "); /* print spaces */
}
if(err == NOTSUPPORTED)
@@ -1277,20 +1277,20 @@ int RUN_COMMAND(const char *cmd, const char *param, unsigned flags, AGENT_RESULT
zabbix_log(LOG_LEVEL_DEBUG, "Run remote command '%s'", command);
- pid = fork(); // run new thread 1
+ pid = fork(); /* run new thread 1 */
switch(pid)
{
case -1:
zabbix_log(LOG_LEVEL_WARNING, "fork failed for '%s'",command);
return SYSINFO_RET_FAIL;
case 0:
- pid = fork(); // run new tread 2 to replace by command
+ pid = fork(); /* run new tread 2 to replace by command */
switch(pid)
{
case -1:
zabbix_log(LOG_LEVEL_WARNING, "fork2 failed for '%s'",command);
return SYSINFO_RET_FAIL;
- case 0: // replace thread 2
+ case 0: /* replace thread 2 */
if(execl("/bin/sh", "sh", "-c", command, (char *)0))
{
zabbix_log(LOG_LEVEL_WARNING, "execl failed for '%s'",command);
@@ -1299,12 +1299,12 @@ int RUN_COMMAND(const char *cmd, const char *param, unsigned flags, AGENT_RESULT
/* In normal case the program will never reach this point */
exit(0);
default:
- waitpid(pid, NULL, WNOHANG); // NO WAIT for thread 2 closing
- exit(0); // close thread 1 and transmit thread 2 to system (solve zombie state)
+ waitpid(pid, NULL, WNOHANG); /* NO WAIT for thread 2 closing */
+ exit(0); /* close thread 1 and transmit thread 2 to system (solve zombie state) */
break;
}
default:
- waitpid(pid, NULL, 0); // wait thread 1 closing
+ waitpid(pid, NULL, 0); /* wait thread 1 closing */
break;
}