[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Rename af process



Desværre,

Den dutter ikke!! - setsid sætter kun process-gruppen, dvs. ppid = pid.

Linux understøtter halvvejs at man skriver til argv[0], men top og ps har nogle sjove måder at vise det på.
Hvis top viser fuld kommando, viser den det nye navn - ellers det korte.
En flad `ps` viser det gamle navn, mens ps -f eller ps -oargs viser det nye navn.
Så top og ps er ikke så konsekvente i hvor de tager deres oplysninger....


Jeg er dog nået så langt, at jeg liiiige skal have kigget lidt på execve() .... ;))

Tak for input'et! :))

Hilsen
Stig :))

> Hej
>
> Jeg har fået en lille udfordring, der består i at en kørende UNIX
> process skal give sig selv et nyt navn.
> Programmet skal skrives i C, hvilket ikke er noget problem, men processen
> jo desværre bedøvende ligeglad med at jeg skriver til nogle af
> argv[]'erne.
>
Prøv at søg efter setsid - man setsid
--
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917

_________________________________________________________________
Find det, du søger på MSN Søg http://search.msn.dk



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *