]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
Merge remote-tracking branch 'mvo/debian/sid' into debian/sid
[apt.git] / cmdline / apt-get.cc
index caf69da2aeb7b7a735289f601b563e463e735213..0f18b0e7ce72c3a69906d5730ee3ada42374fe07 100644 (file)
@@ -76,7 +76,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/statfs.h>
 #include <sys/statvfs.h>
@@ -1664,20 +1663,6 @@ static bool ShowHelp(CommandLine &)
       "pages for more information and options.\n"
       "                       This APT has Super Cow Powers.\n");
    return true;
-}
-                                                                       /*}}}*/
-// SigWinch - Window size change signal handler                                /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-static void SigWinch(int)
-{
-   // Riped from GNU ls
-#ifdef TIOCGWINSZ
-   struct winsize ws;
-  
-   if (ioctl(1, TIOCGWINSZ, &ws) != -1 && ws.ws_col >= 5)
-      ScreenWidth = ws.ws_col - 1;
-#endif
 }
                                                                        /*}}}*/
 int main(int argc,const char *argv[])                                  /*{{{*/
@@ -1734,14 +1719,12 @@ int main(int argc,const char *argv[])                                   /*{{{*/
    // see if we are in simulate mode
    CheckSimulateMode(CmdL);
 
+   // Init the signals
+   InitSignals();
+
    // Setup the output streams
    InitOutput();
 
-   // Setup the signals
-   signal(SIGPIPE,SIG_IGN);
-   signal(SIGWINCH,SigWinch);
-   SigWinch(0);
-
    // Match the operation
    CmdL.DispatchArg(Cmds);