]> git.baikalelectronics.ru Git - kernel.git/commit
Documentation/watchdog: Fix the file descriptor leak when no cmdline arg given
authorDevendra Naga <devendra.aaru@gmail.com>
Thu, 17 May 2012 09:37:48 +0000 (15:07 +0530)
committerWim Van Sebroeck <wim@iguana.be>
Wed, 23 May 2012 14:27:48 +0000 (16:27 +0200)
commitfd47e83e13ba68c1b2c77c784f8c8e82e7f8ab96
tree0621fd18462f9308fc0c66543d05b756a3d51557
parentf855e39de2e72cff2eebabfbc1569fd4635f40dd
Documentation/watchdog: Fix the file descriptor leak when no cmdline arg given

we start a infinite loop when user gives ./watchdog-test, and when user
ctrl + c's the program, we just exit immeadiately with out closing the
filedescriptor of the watchdog device. a signal handler is used to
do the job of closing the filedescriptor and exiting the program.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Documentation/watchdog/src/watchdog-test.c