Search:

Type: Posts; User: Freaky256

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    2,665

    Generate all subsequence combinations

    I need all combinations of subsets of a string. In addition, a subset of length 1 can only be followed by a subset with length > 1. E.g. for string 4824 the result should be:

    [ [4, 824], [4, 82,...
  2. Replies
    7
    Views
    3,191

    Does that mean every time when the timeout...

    Does that mean every time when the timeout elapses before I receive a packet I get an error? Because than it would not make any difference to increase the timeout because I'm not even sure I will...
  3. Replies
    7
    Views
    3,191

    Ok now I get the additional info: Resource...

    Ok now I get the additional info:


    Resource temporarily unavailable
  4. Replies
    7
    Views
    3,191

    Alright, but if I omit the loop and simply send...

    Alright, but if I omit the loop and simply send only one packet, when calling the recv(...)


    if ((bytes = recv(sock_fd, packet, sizeof(packet), 0)) <= 0) {
    printf("ERROR READ\n");...
  5. Replies
    7
    Views
    3,191

    sending raw packets in loop

    I would like to send ethernet packets in a loop and then receive the reply packet (if any). Here the short version of the code (hope its understandable enough):



    for (int i=0; i<someValue; i++)...
  6. Replies
    0
    Views
    1,049

    Process, pipes

    Two processes shall communicate with each other. After two seconds the father should send a message to his son, if he's still alive and vice versa. The user can kill one of the two processes entering...
  7. Replies
    9
    Views
    5,614

    Ok changed my code no, looks like this: ...

    Ok changed my code no, looks like this:



    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
  8. Replies
    9
    Views
    5,614

    Ok but after I created another fork() do I still...

    Ok but after I created another fork() do I still have just 2 branches or do I have to make four now?
    Like:



    pid1 = fork();
    pid2 = fork();

    if (pid1==0) {
  9. Replies
    9
    Views
    5,614

    But were do I have to write the second pipe into...

    But were do I have to write the second pipe into the "else" branch?
  10. Replies
    9
    Views
    5,614

    We are not allowed to use popen or system...

    We are not allowed to use popen or system...
  11. Replies
    9
    Views
    5,614

    Process and Pipes

    I have to create a pipe which simulates the shell command " ps -aux | sort -n | head -10 "

    For one pipe the code would be like this:




    #include <stdio.h>
    #include <stdlib.h>
    #include...
Results 1 to 11 of 12