snap command uses open call to open the input file and then uses sysread call to copy content from soure file to destination. Command hangs if input file is blocked. This patch uses sysopen with NONBLOCK flag instead of regular open call so that we don't hang.
snap command uses open call to open the input file and
then uses sysread call to copy content from soure file
to destination. Command hangs if input file is blocked.
This patch uses sysopen with NONBLOCK flag instead of
regular open call so that we don't hang.

Signed-off-by: Bharani C.V. <26e14037a9917d589124cb5ab7562a3ee9f566a1@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <a6d753843573f7bfed5075c1e875b0be8007a0ab@linux.vnet.ibm.com>

shenki/powerpc-utils,tyreld/powerpc-utils,tyreld/powerpc-utils,shenki/powerpc-utils,mdroth/powerpc-utils,leitao/powerpc-ibm-utils-debian,kamalesh-babulal/powerpc-utils,mdroth/powerpc-utils,shenki/powerpc-utils,mdroth/powerpc-utils,kamalesh-babulal/powerpc-utils,tyreld/powerpc-utils,kamalesh-babulal/powerpc-utils,leitao/powerpc-ibm-utils-debian,leitao/powerpc-ibm-utils-debian