[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] running a process that doesn't return
From: |
Michael Gliwinski |
Subject: |
Re: [Fab-user] running a process that doesn't return |
Date: |
Mon, 13 Jun 2011 13:28:46 +0100 |
User-agent: |
KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.3; x86_64; ; ) |
On Friday 10 Jun 2011 13:57:21 Lee Connell wrote:
> Jeff, i am using an init script to start and stop my python program.
> I setup my python app to redirect stdout to a log file, this works
> fine when i run the python app directly. when i execute the app from
> a bash script it does not get redirected to my log file, why would
> that be? even if I don't use start-stop-daemon and just run it like
> this: /app/python/pyrest.py & it doesn't work
...
> start-stop-daemon --start --background --chdir $APP_CWD
> --pidfile $APP_PID --make-pidfile --exec $DAEMON -- $APP_OPTS
I don't think start-stop-daemon actually does any redirecting. I can't
remember the details but just google 'python daemon' to check what your
program should do, I think it's something like close fds and fork.
Or you could try if adding &> /path/to/logfile < /dev/null would work around
it.
--
Michael Gliwinski
Henderson Group Information Services
9-11 Hightown Avenue, Newtownabby, BT36 4RT
Phone: 028 9034 3319
**********************************************************************************************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee and access to the email by anyone else
is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or
any action taken or omitted to be taken in reliance on it, is prohibited and
may be unlawful.
When addressed to our clients, any opinions or advice contained in this e-mail
are subject to the terms and conditions expressed in the governing client
engagement leter or contract.
If you have received this email in error please notify address@hidden
John Henderson (Holdings) Ltd
Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland,
BT36 4RT.
Registered in Northern Ireland
Registration Number NI010588
Vat No.: 814 6399 12
*********************************************************************************