Changeset 5060:131aca73bbbd in roaraudio


Ignore:
Timestamp:
06/17/11 20:44:29 (10 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support --daemon on win32

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/roard.c

    r5047 r5060  
    180180 printf("Misc Options:\n\n"); 
    181181 printf( 
     182#if defined(ROAR_HAVE_FORK) || defined(ROAR_TARGET_WIN32) 
    182183        " --daemon              - Bring the server into background after init\n" 
     184#endif 
    183185        " --verbose             - Be more verbose, can be used multiple times\n" 
    184186        " --terminate           - Terminate after last client quited\n" 
     
    13401342 struct roard_config config; 
    13411343 const struct rolestack * rolestack; 
    1342 #ifdef ROAR_HAVE_FORK 
     1344#if defined(ROAR_HAVE_FORK) || defined(ROAR_TARGET_WIN32) 
    13431345 int    daemon       = 0; 
    13441346#endif 
     
    15861588 
    15871589  } else if ( strcmp(k, "--demon") == 0 || strcmp(k, "--daemon") == 0 ) { 
    1588 #ifdef ROAR_HAVE_FORK 
     1590#if defined(ROAR_HAVE_FORK) || defined(ROAR_TARGET_WIN32) 
    15891591   daemon = 1; 
    15901592#else 
     
    24392441  return 1; 
    24402442 
    2441 #ifdef ROAR_HAVE_FORK 
     2443#if defined(ROAR_HAVE_FORK) || defined(ROAR_TARGET_WIN32) 
    24422444 if ( daemon ) { 
    24432445#ifdef ROAR_HAVE_SYSLOG 
     
    24472449#endif 
    24482450 
     2451#ifdef ROAR_TARGET_WIN32 
     2452  FreeConsole(); 
     2453#else 
     2454 
    24492455  close(ROAR_STDIN ); 
    24502456  close(ROAR_STDOUT); 
     
    24582464#endif 
    24592465  clients_set_pid(g_self_client, getpid()); // reset pid as it changed 
     2466#endif 
    24602467 } 
    24612468#endif 
Note: See TracChangeset for help on using the changeset viewer.