edoc feature request

Serge Aleynikov <>
Thu Feb 2 14:14:18 CET 2006

I already raised this question on the list, but did not get a definitive 
answer. :-(

So, I would definitely vote for adding to the OTP:



P.S. Attached patch should help.

Richard Carlsson wrote:
> Fredrik Thulin wrote:
>>I would vote for just making edoc return non-zero on error (like you
>>suggested) by default. Always.
>>Since, as far as I understand your original problem description, there
>>hasn't been any difference in the exit code of the edoc beam process
>>there can't be any scripts that depend on it today, so backwards
>>compatibility is not an issue.
> The main snag seems to be that if I use halt(NonZero), the emulator
> is often in such a hurry to quit that not all I/O has time to finish,
> which means that you might not see the message explaining what the
> problem was. So it was a design decision to not use halt, but instead
> rely on the final "-s init stop" in the command-line invocation.
> Sadly, there is no init:stop/1 which could be used to terminate nicely
> *and* return an exit code. It would be pretty trivial to add (if OTP
> would accept it), but that would not solve the problem for edoc until
> the next release of OTP (and assuming that all users switch to the
> new system).
> I could add a small delay before calling halt(NonZero) upon errors,
> if that's the only other way out of the problem. It's not a pretty
> solution, but what the heck.
> If anybody knows a good way to shut down the system nicely but as
> quick as possible and with a particular exit code, please let me know.
>>If there _are_ scripts/makefiles that check the exit status already, I
>>bet they all think edoc exits with a non-zero exit value on errors.
> Probably. It would be nice if it worked, too.
> 	/Richard

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: init.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060202/c8f4d2d1/attachment.ksh>
-------------- next part --------------
An embedded message was scrubbed...
From: Serge Aleynikov <>
Subject: Re: emulator exit
Date: Thu, 04 Aug 2005 09:42:41 -0400
Size: 3340
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060202/c8f4d2d1/attachment.mht>

More information about the erlang-questions mailing list