Allocate the right amount of memory for ev_child
This commit is contained in:
parent
6ad922dbd5
commit
17484d82f2
@ -169,7 +169,7 @@ void start_child(char *command) {
|
||||
ev_io_start(main_loop, stdin_io);
|
||||
|
||||
/* We must cleanup, if the child unexpectedly terminates */
|
||||
child_sig = malloc(sizeof(ev_io));
|
||||
child_sig = malloc(sizeof(ev_child));
|
||||
ev_child_init(child_sig, &child_sig_cb, child_pid, 0);
|
||||
ev_child_start(main_loop, child_sig);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user