mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-25 23:28:17 -04:00
- For win32: made --no-detach the default for daemon mode.
- Added --detach (a --daemon option).
This commit is contained in:
1 parent
80ffc3de12
commit
1f35babc6b
1 file changed
+9
-2
@@ -116,7 +116,12 @@ int default_af_hint = AF_INET; /* Must use IPv4 */
|
||||
/** Do not go into the background when run as --daemon. Good
|
||||
* for debugging and required for running as a service on W32,
|
||||
* or under Unix process-monitors. **/
|
||||
int no_detach = 0;
|
||||
int no_detach
|
||||
#if defined _WIN32 || defined __WIN32__
|
||||
= 1;
|
||||
#else
|
||||
= 0;
|
||||
#endif
|
||||
|
||||
int write_batch = 0;
|
||||
int read_batch = 0;
|
||||
@@ -456,6 +461,7 @@ static struct poptOption long_options[] = {
|
||||
{"address", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
|
||||
{"config", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
|
||||
{"daemon", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
|
||||
{"detach", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
|
||||
{"no-detach", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
|
||||
{0,0,0,0, 0, 0, 0}
|
||||
};
|
||||
@@ -491,7 +497,8 @@ static struct poptOption long_daemon_options[] = {
|
||||
{"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 },
|
||||
{"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 },
|
||||
#endif
|
||||
{"no-detach", 0, POPT_ARG_NONE, &no_detach, 0, 0, 0 },
|
||||
{"detach", 0, POPT_ARG_VAL, &no_detach, 0, 0, 0 },
|
||||
{"no-detach", 0, POPT_ARG_VAL, &no_detach, 1, 0, 0 },
|
||||
{"port", 0, POPT_ARG_INT, &rsync_port, 0, 0, 0 },
|
||||
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
|
||||
{"server", 0, POPT_ARG_NONE, &am_server, 0, 0, 0 },
|
||||
|
||||
Reference in new issue
Block a user