There currently is no API that one can call that will shutdown arangod.
On Linux, you can send the arangod process a SIGINT, and it start
shutting down.
On Windows, we're using the SetConsoleCtrlHandler command to bind CTRL-C
to a termination handler. This works when arangod is started via an
MS-DOS command prompt.
I guess that when started as a daemon, there is no command prompt and
thus no console available, so the control-handler will not work.
Looks like there is also a signal() function for Windows, but we didn't
try this yet:
http://msdn.microsoft.com/en-us/library/xdkz3x12%28v=vs.90%29.aspx
Maybe this is the way to go. At least I think that taskkill.exe uses
TerminateProcess, and I think this cannot be trapped.
Best regards
Jan
On 21.11.2013 16:36, Frank Celler wrote:
> Cool.
>
> I'm not really a Windows programmer: Jan & I have to investigate how
> "tskill" works.
>
> Cheers
> Frank
>
>
> Am Donnerstag, 21. November 2013 16:29:57 UTC+1 schrieb
skoeh...@gmail.com:
>
> I would like to run ArangoDB as a Windows Service. I tried using the
> --daemon option, but it does not have an effect on Windows systems.
> So, I have put together a script using the service wrapper from
> Apache.
> (
http://commons.apache.org/proper/commons-daemon/procrun.html
> <
http://commons.apache.org/proper/commons-daemon/procrun.html>) I
> can successfully get ArangoDB to start as a service, but stopping
> the service is an issue.
>
> Is there an API call that I can make to the ArangoDB server to
> shutdown? I looked in the documentation, but I could not locate a
> shutdown command. The app tskill.exe in Windows does a terminate
> process, not a signal like SIGINT, so that wont work for me.
>
> Any ideas on how to gracefully shutdown the ArangoDB process?
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "ArangoDB" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
arangodb+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.