Salut les gens ! ! !
 
  Pouvez-vous m'expliquer en gros ce que fait ce petit prog en C...  
 
  Merci !  
 
 
#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
#include<string.h>
 
#define BUFFSIZE 1024
#define MAXPARAMS 8
 
char *argv[MAXPARAMS];
 
int isquit(char *buf);
void tokenize(int nread, char *buf, char *argv[]);
 
int main(void)
{
        int i, nread;
        char *prompt = "what> ";
        char buf[BUFFSIZE];
 
        while(1)
        {       i = 0;
                nread = 0;
                write(STDOUT_FILENO, prompt, strlen(prompt));
                nread = read(STDIN_FILENO, buf, BUFFSIZE);
                if (isquit(buf)) break;
                tokenize(nread, buf, argv);
 
                if(fork()==0)
                {
                       execvp(argv[0], argv);
                       exit(0);
                }
                wait((int *)0);
        }
}
 
 
int isquit(char *buf)
{
     if (buf[0]=='q'&&buf[1]=='u'&
&buf[2]=='i'&&buf[3]=='t'
 
        return 1;
     else
        return 0;
}
 
/*break the input into an array of strings for exec*/
void tokenize(int nread, char *buf, char *argv[MAXPARAMS])
{
 
     int i, j, k, len;
 
     i = 0;
     k = 0;
     while (i < nread)
     {
          j = 0;
          while(isspace(buf[i])) i++;           /*remove leading white  
       	space*/
          if (i >= nread) break;                /*disregard trailing  
       	spaces*/
          while(!isspace(buf[len])) len++;      /*get length of token*/
          argv[k]= (char *)sbrk(len + 1);       /*allocate memory*/
          memset(argv[k],(char)0,len + 1);      /*clear new space*/
          while (!isspace(buf[i]))         /*take the next argument
          from input stream*/
          {
                argv[k][j] = buf[i];        /*copy token from input*/
                i++;j++;
          }
          argv[k][i] = '\0';                    /*make token a null  
       	terminated string*/
          k++;
      }
     argv[k] = NULL;
}