This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
luochen1990's profile picture

How to kill a running process?

Started by luochen1990, 20 January 2020 - 06:12 AM
luochen1990 #1
Posted 20 January 2020 - 07:12 AM
When I run `my_script.lua` on a pad, and there is a `while true do … end` sentence in the script, how can I kill this process?

In the real world, we use `ctrl+c` or `ctrl+d` but they are not working here.

If it is running on a turtle, I can dig the turtle to stop the program, but when it is running on a labeled pad, it seems I can do nothing about it…
Lupus590 #2
Posted 20 January 2020 - 10:32 AM
Ctrl+t should work after a few seconds of holding the key combination. Otherwise you can place the pocket pc in an inventory and it will eventually turn off.
Luca_S #3
Posted 20 January 2020 - 12:22 PM
If Ctrl + T doesn't work, there's also Ctrl + S for shutdown and Ctrl + R for reboot, these should work everytime.

Also iirc putting a pocket computer in a disk drive turns it off.