automake
[Top][All Lists]
Advanced

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

Re: What would the correct way be to handle a program with a PID file be


From: Eric Blake
Subject: Re: What would the correct way be to handle a program with a PID file being built to a prefix directory?
Date: Wed, 18 Jun 2014 08:22:29 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 06/18/2014 08:19 AM, Gavin Smith wrote:
> On Wed, Jun 18, 2014 at 3:47 AM, Michael Lueck
> <address@hidden> wrote:
>> Prefix, building the program with non root permissions to be run in the
>> context of a user's home directory.
>>
>> PID file, generally defaults to /var/run, however in this case permissions
>> are not granted to /var/run. One could assume ~/var/run would be the proper
>> place for the PID file.
>>
>> Building a certain OSS/FS app fails when being built with a prefix
>> specified, as /var/run is still assumed for the PID file. I hacked the
>> source code to obtain ability to target ~/var/run for the PID file, and the
>> program works as expected.
>>
> It depends on the build system of the program in question, but it
> looks like "localstatedir" is the preferred makefile variable for this
> directory, and is as an autoconf output variable. It should be set
> automatically from whatever "prefix" directory was specified.

Actually, autoconf 2.70 (if I ever get time to release it) supports a
new --runstatedir option, which defaults to ${localstatedir}/run; but it
should be preferred over direct use of $localstatedir because some
distros want to stick --runstatedir at /run in stead of /var/run.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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