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

[Q] Idea to prevent Ctrl-S

Started by RunasSudo-AWOLindefinitely, 23 December 2012 - 01:24 PM
RunasSudo-AWOLindefinitely #1
Posted 23 December 2012 - 02:24 PM
I have an idea which I believe could prevent Ctrl-S termination. The idea is that you have two computers, next to each other, one on the left and one on the right.

The left computer repeatedly calls

peripheral.call("right", "turnOn")
while the right computer repeatedly calls

peripheal.call("left", "turnOn")

This way, if one of the computers is Ctrl-S'd, the other one turns it on almost immediately.

Does anyone see any problems with this design?

(Some sleep() statement may be required to prevent "too long without yielding" errors)
Leo Verto #2
Posted 23 December 2012 - 02:33 PM
I don't think this is going to work, CTRL + S is immediatly handled by bios.
ChunLing #3
Posted 23 December 2012 - 04:26 PM
It won't prevent the shutdown, but it will ensure that the computer immediately restarts.

If you put the second computer where it is not visible/accessible to the user of the first computer, then that could be pretty effective. As long as they don't break the computers.

You can have it so that the computer catches the event from the Ctrl being pressed and activates the protection loop by sending a redstone output to the other computer.

For my part, I usually favor having the accessible terminal being only a rednet terminal, so that shutting it down/breaking it doesn't actually accomplish anything.
RunasSudo-AWOLindefinitely #4
Posted 24 December 2012 - 12:39 AM
It won't prevent the shutdown, but it will ensure that the computer immediately restarts.
That's what I was aiming for. Combined with an "automatically delete startup file on floppy" system or something, it could be used to implement a hard-to-bypass login system or something.

I just want to know if there are any potential pitfalls within the system.
KaoS #5
Posted 24 December 2012 - 12:43 AM
it is a great idea, the breaking of the PC is an issue though
ChunLing #6
Posted 24 December 2012 - 06:13 PM
Yeah, that's why I favor a remote terminal (with a wooden pressure plate activating a deathtrap underneath) for access.

But there are a lot of systems where something like this could be very useful (though mostly for the opposite, like a turtle trap).
KaoS #7
Posted 24 December 2012 - 07:13 PM
all I do is have constant redstone signal from my pc powering pistons that hold the floor in place. any restart, shutdown or removal…..
ChunLing #8
Posted 24 December 2012 - 07:40 PM
Yeah…that's a bit scary for me.
KaoS #9
Posted 24 December 2012 - 07:50 PM
haha I love traps. If I could I would work for a faction just building traps continuously but unfortunately people don't get into faction bases so not much point unless you have a public area or an area you control for the specific purpose of trapping players that are scouting… sadness