}
static RETSIGTYPE
-cleanup (void)
+cleanup (int signum)
{
unlink (tempfile);
exit (1);
if (p == 0)
{
error (0, 0, _("virtual memory exhausted"));
- cleanup ();
+ cleanup (0);
}
return p;
}
if (p == 0)
{
error (0, 0, _("virtual memory exhausted"));
- cleanup ();
+ cleanup (0);
}
return p;
}
if (full_write (desc, buffer, size) < 0)
{
error (0, errno, _("write error"));
- cleanup ();
+ cleanup (0);
}
}
else if (ret == -2)
{
error (0, 0, _("error in regular expression search"));
- cleanup ();
+ cleanup (0);
}
else
{
if (fd == -1)
{
error (0, errno, "%s", tempfile);
- cleanup ();
+ cleanup (0);
}
while ((bytes_read = safe_read (0, buffer, read_size)) > 0)
if (full_write (fd, buffer, bytes_read) < 0)
{
error (0, errno, "%s", tempfile);
- cleanup ();
+ cleanup (0);
}
if (close (fd) < 0)
{
error (0, errno, "%s", tempfile);
- cleanup ();
+ cleanup (0);
}
if (bytes_read == -1)
{
error (0, errno, _("read error"));
- cleanup ();
+ cleanup (0);
}
}