Skip to content

Commit

Permalink
Trivia: fix typos & whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
vincele committed May 30, 2018
1 parent 0a441ab commit 77f3d2e
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 @@ -313,7 +313,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 @@ -327,7 +327,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 @@ -403,13 +403,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 @@ -426,9 +426,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 @@ -861,7 +861,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 77f3d2e

Please sign in to comment.