incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Weber <>
Subject Cannot get os_daemon api to function
Date Sun, 02 Feb 2014 05:40:07 GMT
I am using version 1.5.  I can get the daemon to start, but there does not appear to be any
communication on stdin/stdout.

Below are my settings, and a simple C example. I would expect this simple code to log a message,
then give me a reply of the config settings. However nothing happens.

Couch does restart the daemon if I change a config setting under [os_daemons].  And the settings
do appear in the config page of Futon.

The example program does also exit when Couch closes the stdin connection, as expected.

Any advice is appreciated.


level = info


my_test = c:/path/nativeDaemon/debug/NativeDaemon.exe

Value = 10,002
OtherValue = The other value

Actual C code  (uses Windows Sleep, otherwise is agnostic) :

int main() {
    char buffer[257];

    LogMessage("\nSTART:", "Daemon Startup");  //  My own log file to disk

    fputs("[\"log\",{\"log\" : \"The process started\"}]\n",stdout);
    fputs("[\"get\", \"os_daemons\"]\n",stdout);

    do {
        if (feof(stdin)) {
            LogMessage("\nCLOSE:","Closed STDIN"); //  This does exit when expected

// etc... into loop.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message