qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Allow setting qemu process name


From: Todd T. Fries
Subject: Re: [Qemu-devel] [PATCH] Allow setting qemu process name
Date: Thu, 23 Jul 2009 07:58:18 -0500
User-agent: Mutt/1.5.19 (2009-01-05)

Penned by Andi Kleen on 20090723 14:01.42, we have:
| > | +static void set_proc_name(const char *prefix, const char *s)
| > | +{
| > | +#ifdef __linux__
| > | +   char name[16];
| > | +   if (!s)
| > | +       return;
| > | +   /* Could rewrite argv[0] too, but that's a bit more complicated.
| > | +      This simple way is enough for `top'. */
| > | +    snprintf(name, sizeof name, "%s-%.10s", prefix, s);
| > | +    prctl(PR_SET_NAME, name);
| > #elif defined(__OpenBSD__)
| >     if (!s)
| >         setproctitle("%s-%.10s", prefix, s);
| 
| Are you sure? A google codesearch on openbsd.org doesn't find
| any references to PR_SET_NAME in the system.
| 
| -Andi
| 
| -- 
| address@hidden -- Speaking for myself only.

I didn't use PR_SET_NAME, read the code..

http://www.openbsd.org/cgi-bin/man.cgi?query=setproctitle
-- 
Todd Fries .. address@hidden

 _____________________________________________
|                                             \  1.636.410.0632 (voice)
| Free Daemon Consulting, LLC                 \  1.405.227.9094 (voice)
| http://FreeDaemonConsulting.com             \  1.866.792.3418 (FAX)
| "..in support of free software solutions."  \  sip:address@hidden
|                                             \  sip:address@hidden
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
                                                 
              37E7 D3EB 74D0 8D66 A68D  B866 0326 204E 3F42 004A
                        http://todd.fries.net/pgp.txt





reply via email to

[Prev in Thread] Current Thread [Next in Thread]