Search:

Type: Posts; User: hosseinyounesi

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds; generated 34 minute(s) ago.

  1. Replies
    2
    Views
    4,179

    long time and no answer! Is this forum alive?!!!

    long time and no answer! Is this forum alive?!!!
  2. Replies
    7
    Views
    4,161

    long time and no answer! Is this forum alive?!!!

    long time and no answer! Is this forum alive?!!!
  3. Replies
    2
    Views
    4,179

    socket time_wait problem

    Hi,

    I'm using sockets for communication. Everything works fine but when i use netstat on server,
    There are many connections with "TIME_WAIT" state and are increasing! I shutdown and close the...
  4. Replies
    7
    Views
    4,161

    TIME_WAIT problem

    Hi,

    I'm using sockets for communication. Everything works fine but when i use netstat on server,
    There are many connections with "TIME_WAIT" state and are increasing! I shutdown and close the...
  5. Hi, I used flock and it is working now :D...

    Hi,
    I used flock and it is working now :D
    flock(2) - Linux man page


    int fd=open(LOCK_FILE, O_RDWR|O_CREAT,0640);
    if (fd<0)
    cout << "Could not open lockfile" << endl;

    ...
  6. What's this?! With the code I posted, two...

    What's this?!


    With the code I posted, two execution of the program can be executed and the lockf return 0 for each of them!!!
  7. "unique" library?! What do you mean?! It's a C...

    "unique" library?! What do you mean?! It's a C library or ... ?!
  8. There is no compile error, but two or more...

    There is no compile error, but two or more instance of the program can still be executed at the same time (simultaneously) :(
  9. Mutual Exclusion and Running a Single Copy [open,lockf,getpid]

    Hi,
    I'm writing a daemon and now that must be run in a single process (two instance of process should not be executed at the same time). I tried this code, but it didn't work:


    int...
  10. Replies
    16
    Views
    14,460

    This is what I tried, and it is working now :) ...

    This is what I tried, and it is working now :)

    read:


    fd_set rfds;
    int res=0;
    int retval;
    struct timeval tv;
    //////////////////
  11. Replies
    16
    Views
    9,522

    Thanks, But my question is: When I use fork and...

    Thanks, But my question is: When I use fork and the exec in child process, the parent will not be "zombie" although the child is terminated. WHY ?

    (As you know, If a child terminates before...
  12. Replies
    16
    Views
    9,522

    You are right. Another question: If a child...

    You are right. Another question: If a child process terminate before the parent, after a few time the parent will be a "Zombie" process. And we know that "exec(newProcess)" family system calls,...
  13. Replies
    15
    Views
    15,868

    Hi everyone, At last I found it :cool:...

    Hi everyone, At last I found it :cool: "/proc/net/dev" is what I need. This file consists of some counters for each interface, each one counts the number of packets (and bytes). ifconfig uses this...
  14. Replies
    15
    Views
    15,868

    I know what is "google" !!!!!! I hope that you...

    I know what is "google" !!!!!! I hope that you are joking :) I just thought that maybe someone has did this before :(
    I will report my attempt here about libpcap and ifstat or ...

    Thanks again
  15. Replies
    15
    Views
    15,868

    yes, but isn't there any function or library that...

    yes, but isn't there any function or library that can be used in C or C++ ?!
  16. Replies
    15
    Views
    15,868

    Thanks, But I think that you don't understand my...

    Thanks, But I think that you don't understand my question! I said that I've used "GetIfTable" to collect information in windows. I introduced ifstat, ...
    By the way, Excuse me if I didn't ask my...
  17. Replies
    15
    Views
    15,868

    I need the send/receive of each interfaces :cool:

    I need the send/receive of each interfaces :cool:
  18. Replies
    15
    Views
    15,868

    Thanks, I mean that I have to write a software...

    Thanks,
    I mean that I have to write a software and I need to get nic traffic!!! Clear?
    But what the code you've written is ?!!!! :(
  19. Replies
    15
    Views
    15,868

    Thanks, I have to use a program to do that!!!...

    Thanks,
    I have to use a program to do that!!! What is "ifstat" ?!
  20. Replies
    15
    Views
    15,868

    Network Interface Card Traffic

    Hi,
    I want to get send/receive of my PC NICs in Linux?! For windows I can use "GetIfTable" and process the output. And about linux?! UI have to install some software ?!

    Thanks everyone
  21. Replies
    16
    Views
    9,522

    this can be a way. But the forked process name is...

    this can be a way. But the forked process name is not the executed application name!!! It's name is the process name that calls fork? Am I right? How to fix this?

    Thanks anyone
  22. Replies
    16
    Views
    14,460

    I'm going to be disappointed :( But I think...

    I'm going to be disappointed :(
    But I think using a blocking read after successful nonblocking read will do my job!

    Another question: After closing my program, will the pipe file be deleted? I...
  23. Replies
    16
    Views
    14,460

    I wrote the program to 'write' on the read...

    I wrote the program to 'write' on the read program you wrote. But some times the write program fails on write and read program sometimes crashes on open or read. Also, you haven't used 'select'...
  24. Replies
    16
    Views
    14,460

    Thanks a lot, I'm gonna test it and I will report...

    Thanks a lot, I'm gonna test it and I will report the result here :)
  25. Replies
    16
    Views
    14,460

    Thanks, would you mind give me an example or use...

    Thanks, would you mind give me an example or use select in the program I wrote in the first post?
Results 1 to 25 of 61
Page 1 of 3 1 2 3