Quote:
Originally Posted by MrUmunhum
Umunhum means 'Home of the hummingbird', it's where I live
|
I'm aware of it, and saw it as your location on your post; please pardon my lame attempt at humor.
Quote:
Originally Posted by MrUmunhum
]I'm writing a user interface and have little control over what the user does.
|
AFAIK, I've heard plenty of people suggest that User input should be validated before being used.
But if somehow you really can't, then perhaps some sort of "Sandbox" can be used to prevent problems.
Especially if they have unrestricted access to a shell where they could run commands that could start other commands, and even start multiple commands.
Quote:
Originally Posted by MrUmunhum
]I am thinking about using a 'select' or a 'timeout'?
|
How well any sort of timeout, whether that built into select or a separate timeout, might work could depend on the range of different types of things a User is allowed to do, the collection of different machines on which they could run a command, and the amount of other work being done on the various machines.
If on a computer which is more or less just sitting around not doing much, a User wants to run a simple command, perhaps to do a quick calculation:
a "short" timeout might be appropriate. But if a User could also run a program to translate the text of an entire encyclopedia from one language to another, on a machine which is already heavily loaded with other work, a very large timeout might be needed.