From: Mike Hearn <mike@plan99.net>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Re: Change processname for dmix/dsnoop process
Date: Tue, 04 Oct 2005 15:40:04 +0100 [thread overview]
Message-ID: <43429444.20903@plan99.net> (raw)
In-Reply-To: <s5h3bnheekv.wl%tiwai@suse.de>
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);
thanks -mike
Takashi Iwai wrote:
>At Sun, 02 Oct 2005 00:13:56 +0100,
>Mike Hearn wrote:
>
>
>>On Fri, 30 Sep 2005 16:41:10 +0200, Takashi Iwai wrote:
>>
>>
>>>Well, changing the process name in run time is very tricky on Linux. In
>>>other words: no proper way.
>>>
>>>
>>Are you sure? I thought there was a syscall for it.
>>
>>
>
>Then I'd be happy to change the code. Could you give a pointer?
>
>
>Takashi
>
>
>
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
next prev parent reply other threads:[~2005-10-04 14:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-30 14:18 Change processname for dmix/dsnoop process Gregor Jasny
2005-09-30 14:41 ` Takashi Iwai
2005-10-01 23:13 ` Mike Hearn
2005-10-04 10:55 ` Takashi Iwai
2005-10-04 14:04 ` Mike Hearn
2005-10-04 14:40 ` Mike Hearn [this message]
2005-10-04 14:53 ` Takashi Iwai
2005-10-04 17:40 ` Takashi Iwai
2005-10-04 18:38 ` Mike Hearn
2005-10-05 9:54 ` Takashi Iwai
2005-10-05 15:50 ` Mike Hearn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43429444.20903@plan99.net \
--to=mike@plan99.net \
--cc=alsa-devel@lists.sourceforge.net \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox