summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-05-05 17:13:24 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-05-05 17:13:24 +0200
commitb4278cc96fa0184b4f522e2bcfe82bd8eba93595 (patch)
tree59969ad6463918810ca264854615e8b2cfdf0bad /cmdline
parentf3594b9de99745c84563bac3ef59a159e30d4cd8 (diff)
parent3fa4e98f62e469f4292d2811b4e15f4afb678fbd (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: configure.ac debian/apt.dirs debian/changelog
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc22
-rw-r--r--cmdline/apt.cc4
2 files changed, 7 insertions, 19 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index e7fd4bfb8..a24a1b45a 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1669,20 +1669,6 @@ static bool ShowHelp(CommandLine &)
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[]) /*{{{*/
{
CommandLine::Dispatch Cmds[] = {{"update",&DoUpdate},
@@ -1737,14 +1723,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);
diff --git a/cmdline/apt.cc b/cmdline/apt.cc
index 4813861a4..72086af14 100644
--- a/cmdline/apt.cc
+++ b/cmdline/apt.cc
@@ -96,6 +96,10 @@ int main(int argc, const char *argv[]) /*{{{*/
std::vector<CommandLine::Args> Args = getCommandArgs("apt", CommandLine::GetCommand(Cmds, argc, argv));
+ // Init the signals
+ InitSignals();
+
+ // Init the output
InitOutput();
// Set up gettext support