[erlang-questions] Report errors when using "-detached" option
Michael McDaniel
erlangy@REDACTED
Wed Nov 12 21:39:21 CET 2008
If I use -detached and want to start from scripts (on Linux),
I use something like...
------------
export LOGS=/some/path/to/logs
if ! $(test -d ${LOGS}) ; then
echo "directory ${LOGS} does not exist"
exit
fi
...
------------
to check for directories or files (run 'man test' for all the flags).
I do not know about MS Windows.
~Michael
On Wed, Nov 12, 2008 at 09:02:58PM +0100, ERLANG wrote:
> Hi List,
>
> Sometimes, I've to start my erlang applications with "-detached"
> option.
> Suppose that an application needs a directory somewhere to be able to
> run.
> If this directory is missing, nothing is reported in the shell du to
> the "-detached" option.
>
> So my question is related to how to report any error when using "-
> detached"?
>
> My erlang apps are usually started from shell scripts. It'll be very
> helpful if the erlang app can report
> errors with an "exit" code status different from 0. The shell script
> will use this exit code to throw
> the error to a higher level.
>
> I'm not interested to use the error logger to solve this problem.
>
> Regards
> Y.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
--
Michael McDaniel
Portland, Oregon, USA
http://autosys.us
More information about the erlang-questions
mailing list