When the command before the while/until loop is interrupted by
Ctrl-C, the loop will be skipped. See examples below:

=> echo start ; tftpboot test.bin ; echo interrupt ; while true ; do echo 1oop 
; sleep 1 ; done ; echo end
start
Using eth@10100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'test.bin'.
Load address: 0x81800000
Loading: *
Abort           <-- Press Ctrl-C to exit here
interrupt
end

=> echo start ; until false ; do echo 1oop1 ; sleep 1 ; done ; echo interrupt ; 
until false ; do echo loop2 ; sleep 1 ; done ; echo end
start
1oop1
1oop1
1oop1           <-- Press Ctrl-C to exit here
interrupt
end

I guess we need to clear some flags after pressing Ctrl-C.

Regards,
Shiji Yang

Reply via email to