@@ -3,6 +3,8 @@ AT_BANNER([daemon unit tests - Python])
m4_define([DAEMON_PYN],
[AT_SETUP([daemon - $1])
AT_SKIP_IF([test $2 = no])
+ # Skip this test for Windows, echo $! gives shell pid instead of parent process
+ AT_SKIP_IF([test "$IS_WIN32" = "yes"])
AT_KEYWORDS([python daemon])
AT_CAPTURE_FILE([pid])
AT_CAPTURE_FILE([expected])
@@ -26,6 +28,8 @@ DAEMON_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
m4_define([DAEMON_MONITOR_PYN],
[AT_SETUP([daemon --monitor - $1])
AT_SKIP_IF([test $2 = no])
+ # Skip this test for Windows, echo $! gives shell pid instead of parent process
+ AT_SKIP_IF([test "$IS_WIN32" = "yes"])
AT_CAPTURE_FILE([pid])
AT_CAPTURE_FILE([parent])
AT_CAPTURE_FILE([parentpid])
@@ -73,6 +77,8 @@ DAEMON_MONITOR_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
m4_define([DAEMON_MONITOR_RESTART_PYN],
[AT_SETUP([daemon --monitor restart exit code - $1])
AT_SKIP_IF([test $2 = no])
+ # Skip this test for Windows, echo $! gives shell pid instead of parent process
+ AT_SKIP_IF([test "$IS_WIN32" = "yes"])
AT_CAPTURE_FILE([pid])
AT_CAPTURE_FILE([parent])
AT_CAPTURE_FILE([parentpid])
@@ -120,6 +126,8 @@ DAEMON_MONITOR_RESTART_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
m4_define([DAEMON_DETACH_PYN],
[AT_SETUP([daemon --detach - $1])
AT_SKIP_IF([test $2 = no])
+ # Skip this test for Windows, the detached process isn't visible in msys
Can you explain what the above means? Glancing at the test tells me that something similar works for C code. Why is python different? It may make sense to make this as part of a separate commit.
[Paul Boca] I wrote that explanation because I didn’t saw the PID of the child process in `ps`.
I debugged a little and observed that the SIGTERM handler isn’t executed on Windows