From: Takashi Iwai Subject: Re: Re: Change processname for dmix/dsnoop process Date: Tue, 04 Oct 2005 19:40:56 +0200 Message-ID: References: <433D491A.8070700@vidsoft.de> <43429444.20903@plan99.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Mike Hearn Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Tue, 04 Oct 2005 16:53:37 +0200, I wrote: > > At Tue, 04 Oct 2005 15:40:04 +0100, > Mike Hearn wrote: > > > > Actually, I found it - it's SYS_prctl with PR_SET_NAME (2.6 kernels only). > > > > Something like this: > > > > static inline int prctl(int option, unsigned long arg2, unsigned long arg3, > > unsigned long arg4, unsigned long arg5) > > { > > int ret; > > __asm__ __volatile__ ( "pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx" > > : "=a" (ret) : "0" (SYS_prctl), "r" (option), > > "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5) ); > > return SYSCALL_RET(ret); > > } > > > > prctl(15 /* PR_SET_NAME */, (unsigned long)"dmix", 0, 0, 0); > > Great, looks like we have it in sys/prctl.h. > Let's see whether it works... It seems not always working. At least, ps shows the old content while pstree shows the new name. Possibly because /proc entry doesn't change. Takashi ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl