int pipe_fd[2];
struct tid_process tp = {0};
- if (0 > (conn = accept(listen, NULL, NULL))) {
- perror("Error from TIDS Server accept()");
+ if (0 > (conn = tr_sock_accept(listen))) {
+ tr_err("tids_accept: Error accepting connection");
return 1;
}
return 0;
}
+/**
+ * Clean up any finished TID request processes
+ *
+ * This is called by the main process after forking each TID request. If you want to be
+ * sure finished processes are cleaned up promptly even during a lull in TID requests,
+ * this can be called from the main thread of the main process. It is not thread-safe,
+ * so should not be used from sub-threads. It should not be called by child processes -
+ * this would probably be harmless but ineffective.
+ *
+ * @param tids
+ */
void tids_sweep_procs(TIDS_INSTANCE *tids)
{
guint ii;