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: Andi Kleen
Subject: Re: [Qemu-devel] [PATCH] Allow setting qemu process name
Date: Thu, 23 Jul 2009 14:01:42 +0200
User-agent: Mutt/1.5.17 (2007-11-01)

> | +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.




reply via email to

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