ap

An audio player suited to my tastes
Log | Files | Refs | README | LICENSE

commit 630f8cf19951d31b4c271f43c9244680f6c9090b
parent 6d73f317febe34650e1ab03702021f986fc366e7
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Sat,  9 Oct 2021 07:29:55 -0700

Fork and return after the socket is initialized

This way you can tell when connections are being accepted. Also,
the log level and player state set to zero, which is more sensible.

Diffstat:
Maps/main.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/aps/main.c b/aps/main.c @@ -118,8 +118,12 @@ main(int argc, char *argv[]) if (aps == NULL) die("unable to setup server"); - aps->player->state = STOPPED; - aps->loglevel = ~0; + error = fork(); + if (error == -1) + die("unable to fork"); + else if (error > 0) + return 0; + aps->coms = commands; aps->ncoms = LEN(commands);