exit(127);
}
-static void instance_free_stdio(struct service_instance *in);
+static void
+instance_free_stdio(struct service_instance *in)
+{
+ if (in->_stdout.fd.fd > -1) {
+ ustream_free(&in->_stdout.stream);
+ close(in->_stdout.fd.fd);
+ in->_stdout.fd.fd = -1;
+ }
+
+ if (in->_stderr.fd.fd > -1) {
+ ustream_free(&in->_stderr.stream);
+ close(in->_stderr.fd.fd);
+ in->_stderr.fd.fd = -1;
+ }
+}
void
instance_start(struct service_instance *in)
return true;
}
-static void
-instance_free_stdio(struct service_instance *in)
-{
- if (in->_stdout.fd.fd > -1) {
- ustream_free(&in->_stdout.stream);
- close(in->_stdout.fd.fd);
- in->_stdout.fd.fd = -1;
- }
-
- if (in->_stderr.fd.fd > -1) {
- ustream_free(&in->_stderr.stream);
- close(in->_stderr.fd.fd);
- in->_stderr.fd.fd = -1;
- }
-}
-
void
instance_free(struct service_instance *in)
{