LivelyKernel / LivelyKernel/lively.next
Server restart inside of `test.sh` does not work as expected
Open
@linusha is already working on this.
Since May 16, 2024.
:lady_beetle: bug
- Dominant language
- JavaScript
- Stars
- 90
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
There are several problems with the way we handle server restarts in the test.sh script:
- In the case that the
CIenv variable is not set, the server is not correctly shutdown. - In the case that the
CIenv variable is set, the server is not correctly shutdown when running the script locally. It is unclear why that works remotely, as starting a server locally after running the script does not succeed due to the port already being used. - I could reliably kill everything by invoking
pkill -9 -f '.*lively.*'inside of the same shell that the script ran it previously. However, using the same line inside of the script did not always lead to the same result. I expect that this has something to do with subshells and the UNIX process hierarchy. - There is however an additional catch: The above command will not work as expected for the case that one starts the a new test server (running
test.shwithout theCIenv variable set while another lively server is running on a port other than 9011), as this kills all lively servers. However, we need a command that only kills the one on 9011 and-ndoes not cut it, as we need to kill multiple processes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.