Search:

Type: Posts; User: maritos

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,343

    The problem is that i have to do that way a...

    The problem is that i have to do that way a thread to receive and a thread to read and answer(this is an assignement).
  2. Replies
    6
    Views
    1,343

    #include #include ...

    #include <sys/types.h>
    #include <sys/socket.h>
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <errno.h>
    #include <netinet/in.h>
    #include <time.h>...
  3. Replies
    6
    Views
    1,343

    Web server need help

    Hi i have a problem with my code, if anyone here can help.
    ok i create a thread that executes a function that receives a browser request and put it in a buffer. I create another thread that read the...
  4. Thread: Files help

    by maritos
    Replies
    11
    Views
    1,458

    This is just a piece of my code. The fopen() call...

    This is just a piece of my code. The fopen() call is there. And why cannot
    i make this int array[bytes] . bytes its an int.
  5. Thread: Files help

    by maritos
    Replies
    11
    Views
    1,458

    Ok iīve done something like this. FILE...

    Ok iīve done something like this.



    FILE *fp;

    if(fp != NULL) {
    fseek(fp,0,SEEK_END);
    bytes = ftell(fp);
    int array[bytes];
  6. Thread: Files help

    by maritos
    Replies
    11
    Views
    1,458

    Ok i have done something like this int...

    Ok i have done something like this



    int array[file_lenght];

    fread(array,sizeof(int), file_length, file);
  7. Thread: Files help

    by maritos
    Replies
    11
    Views
    1,458

    Tanks but can you be more especific. I do...

    Tanks but can you be more especific.
    I do this:




    File *fp;
    fp = fopen("...", "rb");
  8. Thread: Files help

    by maritos
    Replies
    11
    Views
    1,458

    Files help

    Hi iīm doing a program that requires sending a message with the lenght of the file and itīs content. How can i do this. I know how to send the content of the file, if the file contains characters,...
  9. Thread: code problem

    by maritos
    Replies
    1
    Views
    1,491

    code problem

    Hi, i have a little problem in my code .




    void thread_exit() {
    thread_t running_thread = list->element;
    thread_t next_thread = list->next->element;
    remove_list(&list,...
  10. Thread: problem

    by maritos
    Replies
    1
    Views
    1,107

    problem

    while(1) {
    char cmd[20];
    printf("Shell: "); scanf("%s",&cmd);
    res = fork();
    if(res==0) {
    if((strcmp("ls",cmd))==0) { execl("/bin/ls","ls",NULL);...
  11. Replies
    4
    Views
    1,394

    so how can i make this work: if i put ...

    so how can i make this work:
    if i put
    >Console$: ls

    i want the program execute the ls command and if i put:

    >Console$: exit

    I quit the program, but it seems he canīt execute any command.
  12. Replies
    4
    Views
    1,394

    Need help please

    Hi, i want to make a little command line shell that executes programs with any required arguments.
    But i dont understand what is the problem, why the program donīt work.




    main() {
    char...
  13. Replies
    7
    Views
    1,129

    Need help please

    I want to make a very simple linux shell in c (one that will just run one program with any required arguments ) but th program is not working, i dont know why.



    void prompt() {
    ...
  14. Thread: problem

    by maritos
    Replies
    7
    Views
    1,106

    Thanks. But what if i want to put 13 and 3 5 by...

    Thanks. But what if i want to put 13 and 3 5 by stdin, like this:
    1 3
    3 5


    #include <stdio.h>

    int main(int argc,...
  15. Thread: problem

    by maritos
    Replies
    7
    Views
    1,106

    #include #define MAX 10 int...

    #include <stdio.h>

    #define MAX 10


    int main(int argc, char**argv)
    {
    int v1,v2,vt1,vt2,a;
    char buff[MAX];
  16. Thread: problem

    by maritos
    Replies
    7
    Views
    1,106

    #include #define MAX 10 int...

    #include <stdio.h>

    #define MAX 10


    int main(int argc, char**argv)
    {
    int v1,v2,vt1,vt2,a;
    char buff[MAX];
  17. Thread: problem

    by maritos
    Replies
    7
    Views
    1,106

    problem

    Hi, i have to make a program that cheks on a file formatted like that:
    1 2 1
    1 3 3
    3 5 6

    If i put 1 3 by stdin the program must return 1 3 3.
    Another example if i put 3 5 by stdin must return...
Results 1 to 17 of 17