zeromq / zbroker

Elastic pipes
Mozilla Public License 2.0
50 stars 11 forks source link

Implement process lockfile and run user/group #66

Closed hintjens closed 10 years ago

hintjens commented 10 years ago

Note, does not work using normal 'make' as zbroker isn't the real binary. Here is how I build/test:

MAIN=zbroker
sudo rm $MAIN
gcc -g -o $MAIN \
    $MAIN.c \
    zpipes_msg.c zpipes_client.c zpipes_server.c \
    -lczmq -lzmq -lzyre -luuid -lsodium
test $? -ne 0 && exit

sudo chown root $MAIN
sudo chgrp root $MAIN
sudo chmod +s $MAIN
./$MAIN

Note example of zbroker.cfg:

server
    timeout = 10        #   Client connection timeout
    background = 0      #   Run as background process
    workdir = .         #   Working directory for daemon
    animate = 1         #   Do we animate or not?
    user = ph           #   Run as this user
    group = ph          #   Run as this group
    lockfile = /var/run/zbroker.pid

Fixes #52 Fixes #53

rpedde commented 10 years ago

I'm going to defer pulling this until make works -- the build and deploy systems I'm using require it.

hintjens commented 10 years ago

I'll remove the failing test. On May 6, 2014 6:08 PM, "Ron Pedde" notifications@github.com wrote:

I'm going to defer pulling this until make works -- the build and deploy systems I'm using require it.

— Reply to this email directly or view it on GitHubhttps://github.com/zeromq/zbroker/pull/66#issuecomment-42322884 .

rpedde commented 10 years ago

thanks.