Don't call systemShutdown() from signal handler so that the media device

is closed.  The FTP library doesn't expect to be called recursively from
an interrupt. :)
This commit is contained in:
Jordan K. Hubbard 1997-01-15 08:01:10 +00:00
parent ecbfcda980
commit 6f1cc2d697
3 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,7 @@ handle_intr(int sig)
WINDOW *save = savescr();
if (!msgYesNo("Are you sure you want to abort the installation?"))
systemShutdown(1);
systemShutdown(-1);
else
restorescr(save);
}
@ -115,7 +115,7 @@ void
systemShutdown(int status)
{
/* If some media is open, close it down */
if (mediaDevice)
if (status >=0 && mediaDevice)
mediaDevice->shutdown(mediaDevice);
/* Shut down the dialog library */

View File

@ -42,7 +42,7 @@ handle_intr(int sig)
WINDOW *save = savescr();
if (!msgYesNo("Are you sure you want to abort the installation?"))
systemShutdown(1);
systemShutdown(-1);
else
restorescr(save);
}
@ -115,7 +115,7 @@ void
systemShutdown(int status)
{
/* If some media is open, close it down */
if (mediaDevice)
if (status >=0 && mediaDevice)
mediaDevice->shutdown(mediaDevice);
/* Shut down the dialog library */

View File

@ -42,7 +42,7 @@ handle_intr(int sig)
WINDOW *save = savescr();
if (!msgYesNo("Are you sure you want to abort the installation?"))
systemShutdown(1);
systemShutdown(-1);
else
restorescr(save);
}
@ -115,7 +115,7 @@ void
systemShutdown(int status)
{
/* If some media is open, close it down */
if (mediaDevice)
if (status >=0 && mediaDevice)
mediaDevice->shutdown(mediaDevice);
/* Shut down the dialog library */