storm@cua.dk (Kim F. Storm) writes: > michael.cadilhac@lrde.org (Michaël Cadilhac) writes: > >> (Final ?) patch attached. > > Looks good to me! > > I wonder whether the pid should be added to deleted_pid_list if SIGCHLD is > not defined? In that case, it would be a memory leak... Oh, hmm... About memory leaks hrm... In fact, there is already a configuration that would lead to the non deletion of the PID from the list: - Call to delete_process, - Interrupted by a signal before inserting in deleted_processes_list , - Deletion from process_alist, - Then delete_process continues by... inserting the dead PID in the deleted_processes_list. I forgot to tell about it in my previous post. Sorry. Any idea for fixing this ? Putting the insertion in deleted_processes_list BEFORE the Kill would limit this leak, but not completely avoid it. > But I also wonder if any of the async process stuff actually works > without SIGCHLD ?!? Are there any systems which support async processes > but don't have SIGCHLD? Indeed, I don't know any system in which SIGCHLD is not defined and that can use sub processes (are we talking about a one-process system ?!). But it would be cleaner, indeed, to define the whole thing iff SIGCHLD is defined. I modified the patch for that (including in sigchld_handler and so because the list is not defined if SIGCHLD is not), and to make the insertion in deleted_processes_list before the kill.