From: "Bert Wesarg" <bert.wesarg@googlemail.com>
To: Ziaudeen.Abdulrazak@sun.com
Cc: linux-c-programming@vger.kernel.org
Subject: Re: How to name the pthread or Renaming?
Date: Mon, 10 Mar 2008 17:41:05 +0100 [thread overview]
Message-ID: <36ca99e90803100941u4294b271lb295ad4b2a3b33ed@mail.gmail.com> (raw)
In-Reply-To: <47D54A87.6010608@sun.com>
Sorry, forgot the ML as CC. I put the ML back on the CC.
On Mon, Mar 10, 2008 at 3:49 PM, ziaudeen <Ziaudeen.Abdulrazak@sun.com> wrote:
>
> Hi Bert,
>
> It is the name which I set using the prctl function prctl(PR_SET_NAME,<null
> terminated string.,0,0,0). It is successfully setting the name for the
> thread. But I don't know how to see the changed thread name using the
> command
> like ps -eLf or ps H.
as the named suggest, prctl(2) is to control a process's attributes.
The name is a attribute to the whole process, and can not be set
individual per thread.
>
> Do you suggest something for me to try to see the changed name of each
> thread?
No, because I think you can not set the name for each thread, at most
for the process.
Anyway, I'm a little confused, in your first mail, you asked how to
set the name for a thread created with pthread_create(3), and now you
ask how you can see the changed name of a thread!
Bert
>
> Regards
> Ziaudeen
>
>
>
>
> Bert Wesarg wrote:
> Hi,
>
> On Mon, Mar 10, 2008 at 11:50 AM, ziaudeen <Ziaudeen.Abdulrazak@sun.com>
> wrote:
>
>
> Hi,
>
> While creating a pthread using the pthread_create function, Is there any
> ways to change/give the name of the thread to our custom names?
>
> About what name do you talking, the name of the binary, which is shown
> in ps/top/...?
>
> If its some internal name, posix threads have no such thing.
>
> Bert
>
>
>
> Please help me, I am a new bee to linux programming
>
> Regards
> Ziaudeen
>
>
>
next prev parent reply other threads:[~2008-03-10 16:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-10 10:50 How to name the pthread or Renaming? ziaudeen
[not found] ` <36ca99e90803100723q142411e0r8e0462be8eac5d6d@mail.gmail.com>
[not found] ` <47D54A87.6010608@sun.com>
2008-03-10 16:41 ` Bert Wesarg [this message]
[not found] ` <47D61F00.1090507@sun.com>
2008-03-11 13:05 ` Bert Wesarg
[not found] ` <47D78410.1020906@sun.com>
2008-03-12 8:12 ` Bert Wesarg
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=36ca99e90803100941u4294b271lb295ad4b2a3b33ed@mail.gmail.com \
--to=bert.wesarg@googlemail.com \
--cc=Ziaudeen.Abdulrazak@sun.com \
--cc=linux-c-programming@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).