int main()
{
FILE *fp = NULL, *fp_in = NULL;
FILE *out_fp = NULL, *diff_fp = NULL;
int main()
{
FILE *fp = NULL, *fp_in = NULL;
FILE *out_fp = NULL, *diff_fp = NULL;
- const char* topcmd = "/vservers/pl_netflow/vsys/test.out";
- const char* top_in_file = "/vservers/pl_netflow/vsys/test.in";
+ const char* topcmd = "feg/test.out";
+ const char* top_in_file = "feg/test.in";
if ((fd_out = open(topcmd, O_RDONLY | O_NONBLOCK)) < 0) {
fprintf(stderr, "error executing top\n");
exit(-1);
}
if ((fd_out = open(topcmd, O_RDONLY | O_NONBLOCK)) < 0) {
fprintf(stderr, "error executing top\n");
exit(-1);
}
if ((fd_in = open(top_in_file, O_WRONLY)) < 0) {
fprintf(stderr, "error opening %s\n", top_in_file);
exit(-1);
if ((fd_in = open(top_in_file, O_WRONLY)) < 0) {
fprintf(stderr, "error opening %s\n", top_in_file);
exit(-1);
res = select(fd_out + 1, &readSet, NULL, NULL, &tv);
if (res < 1) {
res = select(fd_out + 1, &readSet, NULL, NULL, &tv);
if (res < 1) {