ソースを参照

dselect: Move sigwinch baselist member variables into setupsigwinch()

Guillem Jover 10 年 前
コミット
9a75ba2a93
共有2 個のファイルを変更した3 個の追加4 個の削除を含む
  1. 3 2
      dselect/baselist.cc
  2. 0 2
      dselect/dselect.h

+ 3 - 2
dselect/baselist.cc

@@ -95,8 +95,8 @@ baselist::sigwinch_mask(int how)
 void
 baselist::setupsigwinch()
 {
-  osigactp= new(struct sigaction);
-  oblockedp= new(sigset_t);
+  struct sigaction *osigactp = new(struct sigaction);
+  sigset_t *oblockedp = new(sigset_t);
   if (sigprocmask(0, nullptr, oblockedp))
     ohshite(_("failed to get old signal mask"));
   if (sigaction(SIGWINCH, nullptr, osigactp))
@@ -106,6 +106,7 @@ baselist::setupsigwinch()
 
   sigwinch_mask(SIG_BLOCK);
 
+  struct sigaction nsigact;
   memset(&nsigact,0,sizeof(nsigact));
   nsigact.sa_handler= sigwinchhandler;
   sigemptyset(&nsigact.sa_mask);

+ 0 - 2
dselect/dselect.h

@@ -98,8 +98,6 @@ protected:
   // so none of the auto-displaying update routines need to display.
 
   // SIGWINCH handling
-  struct sigaction *osigactp, nsigact;
-  sigset_t *oblockedp;
   void sigwinch_mask(int how);
   void setupsigwinch();