Just to expand on your point, $inLine eq '' will never be true because "\n" != ''
| [reply] [d/l] [select] |
Shouldn't the chomp between the read and the check remove the \n thereby making $inLine eq ''?
What I believe ( and certainly could be wrong ) is that the script is just sitting and waiting at $inLine = <>; without ever recieving anything, and so never gets to any of the code that follows except when there is input. I think what I am looking for is something like the <> but with a configurable timeout period.
| [reply] |
I looked before and I looked now and I don't see a chomp is the original code. It could be there but and I'm not seeing it but, yes, chomp would fix that problem.
As for your analysis that the program is sitting in an idle loop, well, yes, that is the main problem, but I thought sierpinski had already said that.
| [reply] |
Wow, I'm really sorry, I shouldn't be posting when I'm drunk, I thought you were trying to help rather than the guy with the question.
That said, check out what zentara had to say about alarm. Alternatives might be non-blocking reads and using select with a timeout.
Again, sorry, I'll just go away and leave you in peace now ;^)
| [reply] |