[ILUG] Programming problem

From: Thomas Degris (t_thomas at domain trados.ie)
Date: Mon 24 Jul 2000 - 14:11:29 IST


Hello, I don't know if it the right mailing list but I am trying to program
a little thing for Linux and I get two problems.

The first is I would like use the function rand and I can't find out
(sorry, I am net very clever you know...) how I can initialize the series
of random number with the clock or something like that. I get each time the
same serie.

My second problem is I would like run another program. So, I use :
pid=fork();
if (pid==1) { //maybe it's zero, I can't remember
        execv(myprogram,argv);
        exit(0);
}

The problem is when I am doing a ps to see the list of the processus, the
program each time I run it is in the list like a zombie. How it is possible
to finish it completely ?

Thank you very much for your help.

Thomas



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:58 GMT