# # patch "ChangeLog" # from [f42ed6126e6a9e97ed93ffdf3c2ba001960ab902] # to [6113ebafb2987bc30e455162f79f5d272452abba] # # patch "commands.cc" # from [dffdd24d07b1048fa1e02fab7353926776987720] # to [0f98a702a8e1e21a444c42c7a79ec359f7f441c8] # # patch "configure.ac" # from [184cb4ceea71542da6bb7ae96548a3efbb8a4a6d] # to [8ba4d51a19fa3a662ff4f1e819905b3fa8851bdc] # # patch "testsuite.at" # from [c367205bf28bd3358c49e3525815e48b134316fb] # to [1ea66f19066261f848ee8bcd3e1b732ce8e9ff82] # # patch "win32/process.cc" # from [a7d8affe8f0801f5220771f1022285936d48d1f7] # to [abb7fc90da902839ceb22ec4c59e41a5b8bec05c] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,12 @@ +2005-05-07 Matthew Gregan + + * commands.cc (pid_file): Remove leftover debugging output. + * configure.ac: Correct typos in TYPE_PID_T test. + * testsuite.at: Use some trickery on MingW/Cygwin to map the + Windows pid to the Cygwin pid. + * win32/process.cc (process_wait): Correct return type. + (process_spawn): Replace dropped cast on return. + 2005-05-05 Matthew Gregan * monotone.texi: Document --pid-file option for serve command. --- commands.cc +++ commands.cc @@ -287,7 +287,6 @@ file.open(path); file << get_process_id(); file.flush(); - P(F("pid file '%s' created for pid '%d'") % path.string() % get_process_id()); } ~pid_file() --- configure.ac +++ configure.ac @@ -384,7 +384,7 @@ TYPE_SOCKLEN_T AC_DEFUN([TYPE_PID_T], -[AC_CACHE_CHECK([for pid_t], ac_vs_type_pid_t, +[AC_CACHE_CHECK([for pid_t], ac_cv_type_pid_t, [ AC_TRY_COMPILE( [#include ], @@ -392,8 +392,8 @@ ac_cv_type_pid_t=yes, ac_cv_type_pid_t=no) ]) - if test $ac_cv_type_socklen_t = no; then - AC_DEFINE(pid_t, unsigned long, [pid_t substitute.]) + if test $ac_cv_type_pid_t = no; then + AC_DEFINE(pid_t, long, [pid_t substitute.]) fi ]) TYPE_PID_T --- testsuite.at +++ testsuite.at @@ -334,12 +334,22 @@ m4_define([MONOTONE3], MONOTONE --db=test3.db) m4_define([NETSYNC_KILL], [ +if test "$OSTYPE" == "msys"; then + # The a=4/1 thing is to avoid autotest treating $1 as its own parameter. + ps | awk -v pid=$(/dev/null - rm -f monotone_at.pid 2>/dev/null +fi +rm -f monotone_at.pid 2>/dev/null ]) m4_define([NETSYNC_KILLHARD], [ +if test "$OSTYPE" == "msys"; then + # The a=4/1 thing is to avoid autotest treating $1 as its own parameter. + ps | awk -v pid=$(/dev/null - rm -f monotone_at.pid 2>/dev/null +fi +rm -f monotone_at.pid 2>/dev/null ]) # run as NETSYNC_SERVE_N_START(2|3, collection name) --- win32/process.cc +++ win32/process.cc @@ -88,10 +88,10 @@ } free(realexe); CloseHandle(pi.hThread); - return pi.hProcess; + return (pid_t)pi.hProcess; } -pid_t process_wait(pid_t pid, int *res) +int process_wait(pid_t pid, int *res) { HANDLE hProcess = (HANDLE)pid; if (WaitForSingleObject(hProcess, INFINITE)==WAIT_FAILED)