+ c->fd = service->fd;
+ c->fd_out = fileno(stdout);
+
+#ifdef _WIN32
+ /* we are using stdin/out so ignore ctrl-c under windoze */
+ SetConsoleCtrlHandler(NULL, TRUE);
+#endif
+
+ /* do not check for new connections again on stdin */
+ service->fd = -1;
+
+ LOG_INFO("accepting '%s' connection from pipe", service->name);
+ if ((retval = service->new_connection(c)) != ERROR_OK)
+ {
+ LOG_ERROR("attempted '%s' connection rejected", service->name);
+ free(c);
+ return retval;
+ }
+ } else if (service->type == CONNECTION_PIPE)
+ {
+ c->fd = service->fd;
+ /* do not check for new connections again on stdin */
+ service->fd = -1;
+
+ char * out_file = alloc_printf("%so", service->port);
+ c->fd_out = open(out_file, O_WRONLY);
+ free(out_file);
+ if (c->fd_out == -1)
+ {
+ LOG_ERROR("could not open %s", service->port);
+ exit(1);
+ }
+
+ LOG_INFO("accepting '%s' connection from pipe %s", service->name, service->port);
+ if ((retval = service->new_connection(c)) != ERROR_OK)
+ {
+ LOG_ERROR("attempted '%s' connection rejected", service->name);
+ free(c);
+ return retval;
+ }