@ This is an rough cut of the global and static variables in rsync@ that need to be investigated and potentially fixed to make their routines thread safe.     5 *sys_errlist[];  /* Only used if strerror  not diff*/ @ extern int verbose; /* Set globally at program start not diff */C extern const char *io_read_phase; /* set to "unknown" - not diff */ B extern const char *io_write_phase; /* modified in FLIST.C, IO.C */N extern int am_root; /* modified in GENERATOR.C, MAIN.C, OPTIONS.C - not diff*/6 extern char *password_file; /* OPTIONS.C - not diff */) static char user[100]; /* AUTHENTICATE */ 5 extern int suffix_specified; /* options.c not diff */ 7 extern char *backup_suffix; /* options.c  - not diff */ 3 extern char *backup_dir; /* options.c - not diff */ 8 extern int preserve_devices;  /* options.c - not diff */5 extern int preserve_links; /* options.c - not diff */ ; extern int preserve_hard_links;  /* options.c - not diff */ 0 extern int orig_umask;/* options.c - not diff */1 static int initialised;/* options.c - not diff */ 3 extern int safe_symlinks;/* options.c - not diff */ 5 extern char *batch_prefix; /* options.c - not diff */ > static char rsync_flist_file[] = ".rsync_flist"; /* batch.c */= static char rsync_csums_file[] = ".rsync_csums";/* batch.c */ = static char rsync_delta_file[] = ".rsync_delta";/* batch.c */ = static char rsync_argvs_file[] = ".rsync_argvs";/* batch.c */ # static int fdb_delta; /* batch.c */  static int fdb;/* batch.c */# static int fdb_open;  /* batch.c */ # static int fdb_close; /* batch.c */ , static int fdb_delta_open = 1; /* batch.c */P extern int csum_length; /* generator.c, checksum(local?), receiver.c not diff */L extern int remote_version; /* client_server.c,compat.c,options.c not diff */# static char *buf1; /* checksum.c */ ! static int len1; /* checksum.c */ ' static int sumresidue; /* checksum.c */ 1 static char sumrbuf[CSUM_CHUNK]; /* checksum.c */ ) static struct mdfour md; /* checksum.c */ + static char *cleanup_fname; /* cleanup.c */ / static char *cleanup_new_fname; /* cleanup.c */ 8 static struct file_struct *cleanup_file; /* cleanup.c */4 static int cleanup_fd1, cleanup_fd2; /* cleanup.c */6 static struct map_struct *cleanup_buf; /* cleanup.c */+ static int cleanup_pid = 0; /* cleanup.c */ 8 extern int io_error;  /* options.c, sender.c, flist.c */1 extern int keep_partial; /* options.c not diff */ % extern int log_got_error; /* log.c */ . static int inside_cleanup = 0; /* cleanup.c */! static int io_error_fd /* io.c */ @ static const char default_name[] = "UNKNOWN"; /* clientname.c */5 extern int am_daemon; /* main.c options.c not diff */ ? extern int am_server;  /* pipe.c, options.c, main.c not diff */ - static char addr_buf[100]; /* clientname.c */ * static int initialised; /* clientname.c */- static char name_buf[100]; /* clientname.c */ - static char port_buf[100]; /* clientname.c */ : static int initialised; /* clientname.c,util.c,backup.c */= extern int module_id; /* clientserver.c,options.c not diff */ E extern int read_only; /* loadparm.c,options.c,trimslash.c not diff */ 6 extern int rsync_port; /* main.c,options.c not diff */? extern int sanitize_paths; /* clientserver.c,util.c not diff */ : extern int list_only; /* clientserver.c,main.c not diff */J extern int daemon_over_rsh; /* clientserver.c,main.c,options.c not diff */; extern int kludge_around_eof; /* clientserver.c not diff */ D extern int am_sender /* clientserver.c, main.c, options.c, pipe.c */5 extern int default_af_hint; /* options.c  not diff */ > extern char *bind_address; /* options.c, socket.c, not_diff */A extern int io_timeout; /* options.c,generator.c,clientserver.c */ ) extern char *config_file; /* options.c */ 1 static int log_initialised; /* log.c, not diff */ 7 extern int orig_umask;	/* options.c, main.c not diff */ . extern int no_detach; /* options.c not diff */3 extern int always_checksum;/* options.c not diff */ 3 extern int checksum_seed; /* compat.c - conflict */ 9 extern int read_batch;  /* dw */ /* options.c not diff */ : extern int write_batch;  /* dw */ /* options.c not diff *// extern int delete_mode;/* options.c not diff */ < static struct exclude_struct **exclude_list; /* EXCLUDE.C */" static int tested; /* exclude.c */ static char *s; /* exclude.c */   static int more; /* exclude.c */. static char *cvs_ignore_list[] /* exclude.c */% static char last_byte;	/* fileio.c */ & static int last_sparse; /* fileio.c */1 extern int sparse_files; /* options.c not diff */ J extern struct stats stats; /* io.c, main.c, match.c,receiver.c,sender.c */0 extern int make_backups;/* options.c not diff *// extern int do_progress;/* options.c not diff */ / extern int cvs_exclude;/* options.c not diff */ + extern int recurse;/* options.c not diff */ 3 extern int one_file_system;/* options.c not diff */ . extern int copy_links;/* options.c not diff */3 extern int delete_excluded;/* options.c not diff */ 2 extern int relative_paths;/* options.c not diff */5 extern int copy_unsafe_links;/* options.c not diff */ @ static struct exclude_struct **local_exclude_list; /* flist.c */2 static struct file_struct null_file; /* flist.c */* static dev_t filesystem_dev; /* flist.c */% static char *flist_dir; /* flist.c */ J static void send_file_entry(struct file_struct *file, int f, /* flist.c */& static time_t last_time; /* flist.c */& static mode_t last_mode; /* flist.c */' static DEV64_T last_rdev; /* flist.c */ $ static uid_t last_uid; /* flist.c */$ static gid_t last_gid; /* flist.c *// static char lastname[MAXPATHLEN]; /* flist.c */ & static time_t last_time; /* flist.c */& static mode_t last_mode; /* flist.c */' static DEV64_T last_rdev; /* flist.c */ $ static uid_t last_uid; /* flist.c */$ static gid_t last_gid; /* flist.c *// static char lastname[MAXPATHLEN]; /* flist.c */ # static char *lastdir; /* flist.c */ 0 static char names[10][MAXPATHLEN]; /* flist.c */ static int n; /* flist.c */ = extern int ignore_errors; /* loadparm.c,options.c not diff */ 4 extern int ignore_times; /* generator.c,options.c */0 extern int update_only; /* options.c not diff */, extern int dry_run; /* options.c not diff */8 extern int opt_ignore_existing; /* options.c not diff *// extern int block_size; /* options.c not diff */ . extern int size_only; /* options.c not diff */2 extern int modify_window; /* options.c not diff */8 extern int local_server; /* main.c,options.c not diff */* extern char *compare_dest; /* options.c */. extern int whole_file,/* options.c not diff */1 extern int no_whole_file;/* options.c not diff */ - extern int link_dest;/* options.c not diff */ 1 extern int only_existing;/* options.c not diff */ 1 extern int safe_symlinks;/* options.c not diff */ 4 static struct file_struct *hlink_list; /* hlink.c */% static int hlink_count; /* hlink.c */ * static int io_multiplexing_out; /* io.c */) static int io_multiplexing_in; /* io.c */ & static int multiplex_in_fd; /* io.c */( static int multiplex_out_fd; /* *io.c */! static time_t last_io; /* io.c */  static int no_flush; /* io.c */ - extern int bwlimit; /* options.c  not diff */ " static size_t remaining;/* io.c */" static char *io_buffer; /* io.c */& static int io_buffer_count; /* io.c */0 static global Globals; /* loadparm.c not diff */3 static service sDefault = /* loadparm.c not diff */ > static service **ServicePtrs = NULL; /* loadparm.c not diff */6 static int iNumServices = 0; /* loadparm.c not diff */6 static int iServiceIndex = 0;/* loadparm.c not diff */> static BOOL bInGlobalSection = True; /* loadparm.c not diff */G static struct enum_list enum_facilities[] = { /* loadparm.c not diff */ B static struct parm_struct parm_table[] = /* loadparm.c not diff */+ static char *logfname; /* log.c not diff */ * static FILE *logfile; /* log.c not diff */2 static int log_error_fd = -1; /* log.c not diff */2 static struct err_list *err_list_head; /* log,c */2 static struct err_list *err_list_tail; /* log.c */ static int depth; /* log.c */ * extern int quiet; /* options.c not diff */5 extern char *auth_user; /* clientserver.c not diff */ < extern char *log_format; /* loadparm.c,options.c not diff */3 extern struct file_list *batch_flist; /* batch.c */ 7 extern int blocking_io; /* main.c,options.c not diff */ - extern int do_stats; /* options.c not diff */ 1 extern char *rsync_path; /* options.c not diff */ 0 extern int delete_after;/* options.c not diff */5 extern pid_t cleanup_child_pid; /* main.c not diff */ 8 extern char *shell_cmd; /* options.c, main.c not diff */& static int false_alarms; /* match.c */" static int tag_hits; /* match.c */! static int matches; /* match.c */ ) static int64 data_transfer; /* match.c */ , static int total_false_alarms; /* match.c */( static int total_tag_hits; /* match.c */' static int total_matches; /* match.c */ , static struct target *targets; /* match.c */$ static int *tag_table; /* match.c */& static OFF_T last_match; /* match.c */6 static int modify_window_set; /* options.c not diff */D static struct poptOption long_options[] = {/* options.c not diff */2 static char err_buf[100]; /* options.c not diff *// static char argstr[50];/* options.c not diff */ . static char bsize[30];/* options.c not diff *// static char iotime[30];/* options.c not diff */ 0 static char mdelete[30];/* options.c not diff */0 static char mwindow[30];/* options.c not diff */+ static char bw[50];/* options.c not diff */ : static char fext[MAXPATHLEN + 15];/* options.c not diff */2 static char *bufr  = NULL; /* params.c not diff *// static int   bSize = 0; /* params.c not diff */ ( static OFF_T  last_ofs; /* progress.c */2 static struct timeval print_time; /* progress.c */2 static struct timeval start_time; /* progress.c */( static OFF_T  start_ofs; /* progess.c */- extern char *tmpdir; /* options.c not diff */ 4 extern char *backup_suffix; /* options.c not diff */, static struct delete_list { /* receiver.c */. static int dlist_len,/* receiver.c not diff */4 static int dlist_alloc_len;/* receiver.c not diff */. extern int max_delete;/* options.c not diff */4 static int deletion_count; /* receiver.c not diff */@ static char file_sum1[MD4_SUM_LENGTH]; /* receiver.c not diff */@ static char file_sum2[MD4_SUM_LENGTH]; /* receiver.c not diff */D extern int cleanup_got_literal; /* cleanup.c, receiver.c not diff */1 extern int force_delete; /* options.c not diff */g: static gid_t last_in = (gid_t) -2, last_out; /* rsync.c */$ static int ngroups = -2; /* rsync */' static GETGROUPS_T *gidset; /* rsync */r3 extern int do_compression; /* options.c not diff */x5 static int compression_level = Z_DEFAULT_COMPRESSION;o! static int residue; /* token.c */r static char *buf;/* token.c */( static int last_token = -1;/* token.c */" static int run_start;/* token.c */% static int last_run_end;/* token.c */e% static z_stream tx_strm;/* token.c */a static char *obuf;/* token.c */ # static int init_done; /* token.c */n' static int flush_pending; /* token.c */f% static enum recv_state; /* token.c */n& static z_stream rx_strm; /* token.c */  static char *cbuf; /* token.c */  static char *dbuf; /* token.c */" static int rx_token; /* token.c */  static int rx_run; /* token.c */# static int init_done; /* token.c */i$ static int saved_flag; /* token.c */0 extern int numeric_ids; /* options.c not diff *// static struct idlist *uidlist;  /* uidlist.c */ / static struct idlist *gidlist;  /* uidlist.c */i% static uid_t last_in; /* uidlist.c */c& static uid_t last_out; /* uidlist.c */% static gid_t last_in; /* uidlist.c */_& static gid_t last_out; /* uidlist.c */$ static int counter = 1;/* util.c */0 static pid_t all_pids[10]; /* util.c not diff */* static int num_pids; /* util.c not diff */. static char curr_dir[MAXPATHLEN]; /* util.c */$ static int initialised; /* util.c */& static char TimeBuf[200]; /* util.c */  static int (*fn)(); /* util.c */ static void *h; /* util.c */