[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 100% cpu with: while true ;do read < /dev/null ;done

From: Marc Herbert
Subject: Re: 100% cpu with: while true ;do read < /dev/null ;done
Date: Fri, 23 Oct 2009 09:09:14 +0100
User-agent: Thunderbird (X11/20090320)

Jo King a écrit :
>> thanks for reply. agree it's not a
>> bug with bash.
>> i am inclinded to agree with the comments but bash is
>> popular and attracts a lot of newbies into scripting - a bit
>> of smart 'correction' of their wrong ways would at least
>> keep the cpu available for other processes (even a sleep for
>> 100ms would make a huge difference).

"Newbies" should just stay clear from developing any advanced shell
script. There is way too much rope too hang themselves and your example
is just one among many other ways. There is plenty other, newer
programming environments that are far easier and safer to play with and

By the way the same hold for configuring firewalls. It becomes even
worse when it relates to security. ("Security by newbies"... ahem,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]