Lines Matching +full:- +full:- +full:exit +full:- +full:code
2 * This code is mainly taken from Doug Potter's page
4 * http://www-theorie.physik.unizh.ch/~dpotter/howto/daemonize
6 * I contacted him 2007-04-16 about the license for the original code,
11 * Copyright (c)2006 - 2013 Andy Green <andy@warmcat.com>
30 #include "private-lib-core.h"
49 exit(0); in child_handler()
55 exit(0); in child_handler()
62 "unable to create lock file %s, code=%d (%s)\n", in child_handler()
64 exit(0); in child_handler()
70 "unable to write pid to lock file %s, code=%d (%s)\n", in child_handler()
75 exit(0); in child_handler()
79 exit(0); in child_handler()
130 exit(1); in lws_daemonize()
156 fprintf(stderr, "unable to fork daemon, code=%d (%s)", in lws_daemonize()
158 exit(9); in lws_daemonize()
161 /* If we got a good PID, then we can exit the parent process. */ in lws_daemonize()
173 exit(1); in lws_daemonize()
194 "unable to create a new session, code %d (%s)", in lws_daemonize()
196 exit(2); in lws_daemonize()
205 "unable to change directory to %s, code %d (%s)", in lws_daemonize()
207 exit(3); in lws_daemonize()
212 fprintf(stderr, "unable to freopen() stdin, code %d (%s)", in lws_daemonize()
216 fprintf(stderr, "unable to freopen() stdout, code %d (%s)", in lws_daemonize()
220 fprintf(stderr, "unable to freopen() stderr, code %d (%s)", in lws_daemonize()
223 /* Tell the parent process that we are A-okay */ in lws_daemonize()