]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
forb: Add comments to forb_daemon_prepare()
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 15 Feb 2011 15:23:06 +0000 (16:23 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 15 Feb 2011 16:17:34 +0000 (17:17 +0100)
src/daemon.c

index a7341362aeaeaf3a097f8caba79d7ae713933b63..89dd506c4d5ff0b8846b70ecd328bc798af8cac6 100644 (file)
@@ -27,7 +27,7 @@ void forb_daemon_prepare(const char *pid)
                perror("fork");
                exit(1);
        }
-       if (child > 0) {
+       if (child > 0) {        /* In parent */
                close(daemon_pipe[1]);
                ret = read(daemon_pipe[0], &tmp, 1);
                if (pid) {
@@ -38,7 +38,7 @@ void forb_daemon_prepare(const char *pid)
                        }
                }
                exit(ret > 0 ? 0 : 1);
-       } else {
+       } else {                /* In chind */
                close(daemon_pipe[0]);
        }
 }