Skip to content

Commit

Permalink
Merge pull request #19 from vincent-legoll/master
Browse files Browse the repository at this point in the history
Trivia: fix typos & whitespace
  • Loading branch information
jfsmig authored May 30, 2018
2 parents 8b9636e + 77f3d2e commit 6802dac
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/children.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ my_clear_env(void)
}

/**
* Must be called after the fork, from the child, just befoe the execve
* Must be called after the fork, from the child, just before the execve
*/
static char **
_child_build_env(struct child_s *sd)
Expand All @@ -332,7 +332,7 @@ _child_build_env(struct child_s *sd)

new_env = calloc(1 + g_slist_length(sd->env), sizeof(char*));

/* Run the configured environement */
/* Run the configured environment */
for (i=0, l=sd->env; l && l->next ;l=l->next->next) {
k = l->data;
v = l->next->data;
Expand Down Expand Up @@ -409,13 +409,13 @@ _child_start(struct child_s *sd, void *udata, supervisor_cb_f cb)

switch (sd->pid) {

case -1: /*error*/
case -1: /* error */
errsav = errno;
g_strfreev(args);
errno = errsav;
return -1;

case 0: /*child*/
case 0: /* child */
setsid();
sd->pid = getpid();
if (supervisor_cb_postfork != NULL)
Expand All @@ -432,9 +432,9 @@ _child_start(struct child_s *sd, void *udata, supervisor_cb_f cb)

_child_exec(sd, argc, args);
exit(-1);
return 0;/*makes everybody happy*/
return 0; /* makes everybody happy */

default: /*father*/
default: /* father */

INFO("Starting service [%s] with pid %i", sd->key, sd->pid);

Expand Down Expand Up @@ -867,7 +867,7 @@ supervisor_children_enable(const char *key, gboolean enable)
_child_set_flag(sd, MASK_BROKEN, FALSE);

/* We reset the 'last_start_attempt' field. This is necessary
* to explicitely restart services confiured with the 'cry'
* to explicitely restart services configured with the 'cry'
* or 'exit' value for their 'on_die' parameter */
sd->last_start_attempt = 0;
}
Expand Down

0 comments on commit 6802dac

Please sign in to comment.