Skip to content

Commit 1e93434

Browse files
change how profiler is killed to be POSIX compliant
1 parent f70c1d3 commit 1e93434

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cylc/flow/etc/job.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ cylc__set_return() {
200200
###############################################################################
201201
# Save the data using cylc message and exit the profiler
202202
cylc__kill_profiler() {
203-
if [[ -n "${profiler_pid:-}" && -d "/proc/${profiler_pid}" ]]; then
203+
if [[ -n "${profiler_pid:-}" ]] && ps -p "$profiler_pid" > /dev/null; then
204204
kill -s SIGINT "${profiler_pid}" || true
205205
fi
206206
}

0 commit comments

Comments
 (0)