new bee wrote:
> 1. How to change process name of an executing process i.e.
> how can a process change its name from that it was launched?
It modifies argv[0], e.g.
#include <unistd.h>
#include <string.h>
int main(int argc, char **argv)
{
strncpy(argv[0], "Hello, world", strlen(argv[0]));
sleep(1000);
return 0;
}
NB: it's actually a bit more complex; you have to move stuff around to
make space for the string. See the setproctitle() function in the
sendmail source code for the details.
> 2. What is the significance of TIME field in the process listing by ps.
> i.e it lists the cpu time consumed or what? (dont have ps manual ).
CPU time.
--
Glynn Clements <[EMAIL PROTECTED]>