For each process, Nextflow creates a working directory and creates a collection of hidden files to run the job (e.g. .command.begin, .command.log, etc). The .command.run is a bash script that contains nthe commands to execute the process as a job. In this file, we noticed under nxf_main() function there are three trap commands:
trap on_exit EXIT
trap on_term TERM INT USR2
trap ‘’ USR1
We have found that the last trap command, “trap ‘’ USR1”, is causing an issue for our pipeline. We found a hack to overcome this issue, but I am wondering if anyone knows of a way to control which trap commands are included in the .command.run script? Either via optional flags or maybe a configuration file? Or are these just hard coded into a template file?