Search:

Type: Posts; User: smitpatel24

Search: Search took 0.01 seconds.

  1. I forgot to specify that I am using shared memory...

    I forgot to specify that I am using shared memory to share array of fd among 2 processes.

    Now tell me if child 3 will be able to send msg to client ??

    Here is the code
    ...
  2. what if child 3 somehow get pointer to fd...

    what if child 3 somehow get pointer to fd returned by accept call ??
    will child 3 be able to send msg to client ??
  3. I want child 3 to be able to send msg to some...

    I want child 3 to be able to send msg to some clients (not all connected).

    server creates child 3 according to client request.
  4. same file descriptors of all client connections. How to differentiate clients ?

    I want to send diff client diff reply from other child process of server
    For that I use fd of client.
    Every forked child process of server replies to particular client (child created on that client...
  5. Replies
    10
    Views
    4,052

    calloc function returns void pointer and buffer...

    calloc function returns void pointer and buffer is character pointer therefore I have put (char *) in line

    char *buffer=(char *)calloc(256,1);
  6. Replies
    10
    Views
    4,052

    include #include int main()...

    include<stdio.h>
    #include<stdlib.h>
    int main()
    {
    char *cmd="pwd";
    char *buffer=calloc(256,1);
    FILE *f=(FILE *)popen(cmd,"r");
    printf("\nOutput\n");
    ...
  7. Replies
    10
    Views
    4,052

    problem in using popen calloc

    FIRST CODE


    #include<stdlib.h>
    #include<stdio.h>
    int main()
    {
    int n=1;
    char *cmd="pwd";
    char *buffer=(char *)calloc(sizeof(char),256);
Results 1 to 7 of 7