/* 
 * File:   main.c
 * Author: blackpanther
 *
 * Created on October 22, 2010, 1:11 AM
 */

#include <stdio.h>
#include <stdlib.h>

#include <sys/types.h>
#include <unistd.h>


/*
 * 
 */
int main(int argc, char** argv, char* envp[]) {

    printf("(pid:%d|ppid:%d) Hi folks, i'm a dummy program called '%s'\n",getpid(),getppid(),argv[0]);
    printf("(pid:%d|ppid:%d) Here is your parameters : \n{\n",getpid(),getppid());
    argv++;
    while(*argv)
    {
        printf("\t - '%s'",*argv);
        if(*(argv+1)) printf(",");
        printf("\n");
        argv++;
    }
    printf("}\n");
    printf("(pid:%d|ppid:%d) And don't forget your environnements variables !\n{\n",getpid(),getppid());
/*
    while(*envp)
    {
        printf("\t - '%s'",*envp);
        if(*(envp+1)) printf(",");
        printf("\n");
        envp++;
    }
*/
    printf("}\n");
    return (EXIT_SUCCESS);
}

