On Mon, Jun 25, 2012 at 03:08:06AM +0400, Dmitry V. Levin wrote:
> +#if USE_SETPROCTITLE
> +# ifdef HAVE_SETPROCTITLE_H
> +#  include <setproctitle.h>
> +# endif
> +#endif

This means <setproctitle.h> is only included if we have it, and the user
asked us to compile it in.

>  /** Default position of the config file */
>  #ifndef SYSCONFDIR
>  #define SYSCONFDIR "/etc"
> @@ -2249,6 +2255,9 @@ handle_connection(GArray *servers, int net, SERVER 
> *serve, CLIENT *client)
>  
>       msg4(LOG_INFO, "Starting to serve %s for %s",
>            client->exportname, client->clientname);
> +#if USE_SETPROCTITLE
> +     setproctitle("%s", client->clientname);
> +#endif

This means we try to compile it in if the user asked us to do so,
regardless of whether the header is available.

That's a bug waiting to happen.

Additionally, I'm not convinced we need a compile-time option for this.
What's your reason for doing it that way?

-- 
The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to