[xiph-cvs] cvs commit: icecast/src main.c
Ed
oddsock at xiph.org
Sun Feb 2 06:26:54 PST 2003
oddsock 03/02/02 09:26:54
Modified: src main.c
Log:
added initialization routines for curl, and also added the '-b' as a command line param...this will put icecast2 in the background
Revision Changes Path
1.21 +13 -0 icecast/src/main.c
Index: main.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/main.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- main.c 29 Dec 2002 14:06:20 -0000 1.20
+++ main.c 2 Feb 2003 14:26:54 -0000 1.21
@@ -28,6 +28,7 @@
#include "logging.h"
#include "xslt.h"
#include "fserve.h"
+#include "geturl.h"
#include <libxml/xmlmemory.h>
@@ -62,10 +63,12 @@
global_initialize();
refbuf_initialize();
xslt_initialize();
+ curl_initialize();
}
static void _shutdown_subsystems(void)
{
+ curl_shutdown();
fserve_shutdown();
xslt_shutdown();
refbuf_shutdown();
@@ -89,10 +92,20 @@
static int _parse_config_file(int argc, char **argv, char *filename, int size)
{
int i = 1;
+ int processID = 0;
if (argc < 3) return -1;
while (i < argc) {
+ if (strcmp(argv[i], "-b") == 0) {
+#ifndef WIN32
+ fprintf(stdout, "Starting icecast2\nDetaching from the console\n");
+ if ((processID = (int)fork()) > 0) {
+ /* exit the parent */
+ _exit(0);
+ }
+#endif
+ }
if (strcmp(argv[i], "-c") == 0) {
if (i + 1 < argc) {
strncpy(filename, argv[i + 1], size-1);
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list