<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>USB detection and removal - System is get hanged</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/41534/usb-detection-and-removal---system-is-get-hanged</link><description> 
Hi, 

 
I used Keil sample program for USB detection and removal. 

 
In my case, the USB is got detected and started file writing. But
if i removed the USB in between the program is getting hanged. 

 
After further analysis, its found that fclose</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: USB detection and removal - System is get hanged</title><link>https://community.arm.com/thread/93974?ContentTypeID=1</link><pubDate>Mon, 03 Apr 2017 07:16:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fed97207-75a4-4f82-b2fc-a64198797397</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Related: &lt;a href="http://www.keil.com/forum/62422/#/msg204689"&gt;http://www.keil.com/forum/62422/#/msg204689&lt;/a&gt;
?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB detection and removal - System is get hanged</title><link>https://community.arm.com/thread/69912?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2017 04:37:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:59fcb17c-c329-4527-a33e-bce29e9e4ec5</guid><dc:creator>cOSankalp Agarwal</dc:creator><description>&lt;p&gt;&lt;p&gt;
Did you try the latest middleware version (v7.4) from Pack
Installer ?&lt;/p&gt;

&lt;p&gt;
It should solve your issue.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB detection and removal - System is get hanged</title><link>https://community.arm.com/thread/109145?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2017 20:47:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ac470aa5-ea12-4fde-8bdb-256cb42b2a1c</guid><dc:creator>Arun Cyriac</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;/p&gt;

&lt;p&gt;
Thank you for the reply.&lt;/p&gt;

&lt;p&gt;
How could i close the file where file handler is no longer
valid.&lt;/p&gt;

&lt;p&gt;
Is there any method to handle this situation safely. My program is
getting stuck because of unexpected removal of USB.&lt;/p&gt;

&lt;p&gt;
Regards&lt;br /&gt;
Arun&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB detection and removal - System is get hanged</title><link>https://community.arm.com/thread/93973?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2017 14:15:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9a7bdf01-a3a1-47fa-8b5b-1beb191c3fa0</guid><dc:creator>A Coder</dc:creator><description>&lt;p&gt;&lt;p&gt;
Close may be required, but having the ability to recover from
unexpected situations is sure useful. And it&amp;#39;s not as if pulling a
usb stick is an unusual action.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB detection and removal - System is get hanged</title><link>https://community.arm.com/thread/69914?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2017 13:33:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9b6e90b8-934d-48f5-996f-681f94de2805</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
What do you expect to happen when you try to close a file on a
storage device which is no longer physically connected to your
system?!&lt;/p&gt;

&lt;p&gt;
Surely, fclose() must require that the filesystem containing the
file is still there to be closed?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>