[SCM] master: Eliminate frysk.sys.Sig which had hard-wired host values.

cagney@sourceware.org cagney@sourceware.org
Wed Dec 5 05:42:00 GMT 2007


The branch, master has been updated
       via  0e8076d9ad47b55a7451b014124cd9b2428a8bfe (commit)
      from  7f585a43eb4eddf50707b5034a7881c5fad268b9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 0e8076d9ad47b55a7451b014124cd9b2428a8bfe
Author: Andrew Cagney <cagney@redhat.com>
Date:   Wed Dec 5 00:40:42 2007 -0500

    Eliminate frysk.sys.Sig which had hard-wired host values.
    
    XXX: Target code using host frysk.sys.Signal remains.
    
    frysk-core/frysk/debuginfo/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* TestDebugInfoStackTrace.java: Update.
    
    frysk-core/frysk/event/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* PollEventLoop.java: Update.
    	* EventLoop.java: Update.
    	* SignalEvent.java: Update.
    	* EventLoopTestBed.java: Update.
    	* TestSigChild.java: Update.
    	* WaitEventLoop.java: Update.
    
    frysk-core/frysk/hpd/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* QuitCommand.java: Update.
    
    frysk-core/frysk/proc/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* TestTaskTerminateObserver.java: Update.
    	* TestTaskSyscallObserver.java: Update.
    	* TestTaskObserver.java: Update.
    	* TestTaskObserverInstructionSigReturn.java: Update.
    	* TestSyscallSignal.java: Update.
    	* TestProcTasksObserver.java: Update.
    	* TestMemory.java: Update.
    	* TestTaskObserverCode.java: Update.
    	* TestTaskObserverDetach.java: Update.
    
    frysk-core/frysk/proc/live/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* LinuxWaitBuilder.java: Update.
    	* LinuxTask.java: Update.
    	* LinuxTaskState.java: Update.
    
    frysk-core/frysk/stepping/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* TestStepping.java: Update.
    	* SteppingEngine.java: Update.
    	* TestSteppingEngine.java: Update.
    
    frysk-core/frysk/testbed/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* TestSignalWaiter.java: Update.
    	* SignalWaiter.java: Update.
    	* SlaveOffspring.java: Update.
    	* SynchronizedOffspring.java: Update.
    	* Offspring.java: Update.
    	* TestLib.java: Update.
    	* ExecOffspring.java: Update.
    	* LegacyOffspring.java: Update.
    
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* TestFCatch.java: Update.
    	* CoredumpAction.java: Update.
    	* StacktraceAction.java: Update.
    
    frysk-gui/frysk/gui/ChangeLog
    2007-12-05  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* Gui.java: Update.
    
    frysk-gui/frysk/gui/monitor/ChangeLog
    2007-12-05  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* observers/TaskSignaledObserver.java: Update.
    	* MainWindow.java: Update.
    	* observers/TaskTerminatingObserver.java: Update.
    
    frysk-sys/frysk/expunit/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merged frysk.sys.Sig into frysk.sys.Signal.
    	* Expect.java: Use Signal.CHLD.drain().
    
    frysk-sys/frysk/sys/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	* Sig.shenum: Delete; merge into ...
    	* Signal.java (Signal(int)): New; private.
    	(toPrint(), toString()): New.
    	(kill(int)): Replace kill(int,Sig).
    	(tkill(int)): Replace tkill(int,Sig).
    	(drain()): Replace drain(Sig).
    	(HUP, hup()): New.
    	(CHLD, chld()): New.
    	(KILL, kill()): New.
    	(USR1, usr2()): New.
    	(USR2, usr1()): New.
    	(WINCH, winch()): New.
    	(CONT, cont()): New.
    	(ALRM, alrm()): New.
    	(TERM, term()): New.
    	(TRAP, trap()): New.
    	(STOP, stop()): New.
    	(NONE, none()): New.
    	(INT, int_()): New.
    	(SEGV, segv()): New.
    	(BUS, bus()): New.
    	(FPE, fpe()): New.
    	(ILL, ill()): New.
    	(URG, urg()): New.
    	(PWR, pwr()): New.
    	(PROF, prof()): New.
    	(IO, io()): New.
    	* TestPtrace.java: Update.
    	* Ptrace.java: Update.
    	* Itimer.java: Update.
    	* SignalBuilder.java: Update.
    	* Wait.java: Update.
    	* TestFork.java: Update.
    	* ProcessIdentifier.java: Update.
    	* SignalSet.java: Update.
    	* Poll.java: Update.
    	* TestPipePair.java: Update.
    	* TestPseudoTerminal.java: Update.
    	* TestSignalSet.java: Update.
    	* TestWait.java: Update.
    	* cni/Poll.cxx: Update.
    	* PollBuilder.java: Update.
    	* cni/Signal.cxx: Update.
    	* cni/SignalSet.cxx: Update.
    	* cni/Wait.cxx: Update.
    	* cni/Itimer.cxx: Update.
    
    frysk-sys/frysk/sys/termios/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merged frysk.sys.Sig into frysk.sys.Signal.
    	* TestLib.java: Use Signal.CHLD.drain().
    
    frysk-sys/frysk/testbed/ChangeLog
    2007-12-04  Andrew Cagney  <cagney@redhat.com>
    
    	Merge frysk.sys.Sig into frysk.sys.Signal.
    	* TearDownProcess.java: Update.
    	* TestTearDownExpect.java: Update.
    	* AttachedSelf.java: Update.
    	* TestTearDownProcess.java: Update.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/debuginfo/ChangeLog               |    5 +
 .../frysk/debuginfo/TestDebugInfoStackTrace.java   |   18 +-
 frysk-core/frysk/event/ChangeLog                   |   10 +
 frysk-core/frysk/event/EventLoop.java              |   25 ++--
 frysk-core/frysk/event/EventLoopTestBed.java       |   43 ++---
 frysk-core/frysk/event/PollEventLoop.java          |    9 +-
 frysk-core/frysk/event/SignalEvent.java            |   14 +-
 frysk-core/frysk/event/TestSigChild.java           |    8 +-
 frysk-core/frysk/event/WaitEventLoop.java          |    6 +-
 frysk-core/frysk/hpd/ChangeLog                     |    5 +
 frysk-core/frysk/hpd/QuitCommand.java              |    3 +-
 frysk-core/frysk/proc/ChangeLog                    |   11 +
 frysk-core/frysk/proc/TestMemory.java              |    4 +-
 frysk-core/frysk/proc/TestProcTasksObserver.java   |    5 +-
 frysk-core/frysk/proc/TestSyscallSignal.java       |   91 ++++-----
 frysk-core/frysk/proc/TestTaskObserver.java        |   26 ++--
 frysk-core/frysk/proc/TestTaskObserverCode.java    |  201 ++++++++++----------
 frysk-core/frysk/proc/TestTaskObserverDetach.java  |   14 +-
 .../proc/TestTaskObserverInstructionSigReturn.java |   28 ++--
 frysk-core/frysk/proc/TestTaskSyscallObserver.java |   16 +-
 .../frysk/proc/TestTaskTerminateObserver.java      |   18 +-
 frysk-core/frysk/proc/live/ChangeLog               |    7 +
 frysk-core/frysk/proc/live/LinuxTask.java          |   14 +-
 frysk-core/frysk/proc/live/LinuxTaskState.java     |   27 ++--
 frysk-core/frysk/proc/live/LinuxWaitBuilder.java   |   13 +-
 frysk-core/frysk/stepping/ChangeLog                |    7 +
 frysk-core/frysk/stepping/SteppingEngine.java      |    3 +-
 frysk-core/frysk/stepping/TestStepping.java        |   32 ++-
 frysk-core/frysk/stepping/TestSteppingEngine.java  |    5 +-
 frysk-core/frysk/testbed/ChangeLog                 |   12 ++
 frysk-core/frysk/testbed/ExecOffspring.java        |    6 +-
 frysk-core/frysk/testbed/LegacyOffspring.java      |   39 ++--
 frysk-core/frysk/testbed/Offspring.java            |    7 +-
 frysk-core/frysk/testbed/SignalWaiter.java         |   17 +-
 frysk-core/frysk/testbed/SlaveOffspring.java       |   43 +++--
 .../frysk/testbed/SynchronizedOffspring.java       |    8 +-
 frysk-core/frysk/testbed/TestLib.java              |   15 +-
 frysk-core/frysk/testbed/TestSignalWaiter.java     |   15 +-
 frysk-core/frysk/util/ChangeLog                    |    7 +
 frysk-core/frysk/util/CoredumpAction.java          |    5 +-
 frysk-core/frysk/util/StacktraceAction.java        |    4 +-
 frysk-core/frysk/util/TestFCatch.java              |    3 +-
 frysk-gui/frysk/gui/ChangeLog                      |    5 +
 frysk-gui/frysk/gui/Gui.java                       |   39 ++--
 frysk-gui/frysk/gui/monitor/ChangeLog              |    7 +
 frysk-gui/frysk/gui/monitor/MainWindow.java        |   19 +-
 .../monitor/observers/TaskSignaledObserver.java    |   41 +++--
 .../monitor/observers/TaskTerminatingObserver.java |   33 ++--
 frysk-sys/frysk/expunit/ChangeLog                  |    5 +
 frysk-sys/frysk/expunit/Expect.java                |    3 +-
 frysk-sys/frysk/expunit/TestExpect.java            |    5 +-
 frysk-sys/frysk/sys/ChangeLog                      |   49 +++++
 frysk-sys/frysk/sys/Itimer.java                    |   15 +-
 frysk-sys/frysk/sys/Poll.java                      |    9 +-
 frysk-sys/frysk/sys/PollBuilder.java               |    5 +-
 frysk-sys/frysk/sys/ProcessIdentifier.java         |   10 +-
 frysk-sys/frysk/sys/Ptrace.java                    |    3 +-
 frysk-sys/frysk/sys/Sig.shenum                     |   77 --------
 frysk-sys/frysk/sys/Signal.java                    |  153 ++++++++++++++-
 frysk-sys/frysk/sys/SignalBuilder.java             |    5 +-
 frysk-sys/frysk/sys/SignalSet.java                 |   29 ++--
 frysk-sys/frysk/sys/TestFork.java                  |    6 +-
 frysk-sys/frysk/sys/TestPipePair.java              |   14 +-
 frysk-sys/frysk/sys/TestPseudoTerminal.java        |    2 +-
 frysk-sys/frysk/sys/TestPtrace.java                |   23 ++-
 frysk-sys/frysk/sys/TestSignalSet.java             |  103 +++++------
 frysk-sys/frysk/sys/TestWait.java                  |   12 +-
 frysk-sys/frysk/sys/Wait.java                      |    2 +-
 frysk-sys/frysk/sys/cni/Itimer.cxx                 |    6 +-
 frysk-sys/frysk/sys/cni/Poll.cxx                   |    6 +-
 frysk-sys/frysk/sys/cni/Signal.cxx                 |   48 ++++--
 frysk-sys/frysk/sys/cni/SignalSet.cxx              |   18 +-
 frysk-sys/frysk/sys/cni/Wait.cxx                   |    6 +-
 frysk-sys/frysk/sys/termios/ChangeLog              |    5 +
 frysk-sys/frysk/sys/termios/TestLib.java           |    3 +-
 frysk-sys/frysk/testbed/AttachedSelf.java          |    8 +-
 frysk-sys/frysk/testbed/ChangeLog                  |    8 +
 frysk-sys/frysk/testbed/TearDownProcess.java       |   23 +--
 frysk-sys/frysk/testbed/TestTearDownExpect.java    |    4 +-
 frysk-sys/frysk/testbed/TestTearDownProcess.java   |    9 +-
 80 files changed, 912 insertions(+), 755 deletions(-)
 delete mode 100755 frysk-sys/frysk/sys/Sig.shenum

First 500 lines of diff:
diff --git a/frysk-core/frysk/debuginfo/ChangeLog b/frysk-core/frysk/debuginfo/ChangeLog
index ad2fdc3..7706b70 100644
--- a/frysk-core/frysk/debuginfo/ChangeLog
+++ b/frysk-core/frysk/debuginfo/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-04  Andrew Cagney  <cagney@redhat.com>
+
+	Merge frysk.sys.Sig into frysk.sys.Signal.
+	* TestDebugInfoStackTrace.java: Update.
+
 2007-12-03  Stan Cox  <scox@redhat.com>
 
 	* gen-type-expect-tests.py (main): Emit one test per variable.
diff --git a/frysk-core/frysk/debuginfo/TestDebugInfoStackTrace.java b/frysk-core/frysk/debuginfo/TestDebugInfoStackTrace.java
index 91a697b..b986d8a 100644
--- a/frysk-core/frysk/debuginfo/TestDebugInfoStackTrace.java
+++ b/frysk-core/frysk/debuginfo/TestDebugInfoStackTrace.java
@@ -56,7 +56,7 @@ import frysk.stepping.SteppingEngine;
 import frysk.stepping.TaskStepEngine;
 import frysk.symtab.Symbol;
 import frysk.sys.Pid;
-import frysk.sys.Sig;
+import frysk.sys.Signal;
 import frysk.testbed.SynchronizedOffspring;
 import frysk.testbed.TestLib;
 
@@ -96,10 +96,10 @@ public class TestDebugInfoStackTrace
     lock = new LockObserver();
     
     SynchronizedOffspring process
-	= new SynchronizedOffspring (Sig.USR1, new String[] {
+	= new SynchronizedOffspring (Signal.USR1, new String[] {
 					 getExecPath ("funit-rt-looper"),
 					 "" + Pid.get (),
-					 "" + Sig.USR1_
+					 Signal.USR1.toString()
 				     });
     myTask = process.findTaskUsingRefresh(true);
     assertNotNull(myTask);
@@ -215,10 +215,10 @@ public class TestDebugInfoStackTrace
       lock = new LockObserver();
 
     SynchronizedOffspring process
-	= new SynchronizedOffspring (Sig.USR1, new String[] {
+	= new SynchronizedOffspring (Signal.USR1, new String[] {
 					 getExecPath ("funit-rt-threader"),
 					 "" + Pid.get (),
-					 "" + Sig.USR1_
+					 Signal.USR1.toString()
 				     });
     myTask = process.findTaskUsingRefresh(true);
     
@@ -265,10 +265,10 @@ public class TestDebugInfoStackTrace
   testState = PUSH;
   
   SynchronizedOffspring process
-      = new SynchronizedOffspring (Sig.USR1, new String[] {
+      = new SynchronizedOffspring (Signal.USR1, new String[] {
 				       getExecPath ("funit-rt-stepper"),
 				       "" + Pid.get (),
-				       "" + Sig.USR1_
+				       Signal.USR1.toString()
 				   });
   myTask = process.findTaskUsingRefresh(true);
   myProc = myTask.getProc();
@@ -303,10 +303,10 @@ public class TestDebugInfoStackTrace
   testState = POP;
   
   SynchronizedOffspring process
-      = new SynchronizedOffspring (Sig.USR1, new String[] {
+      = new SynchronizedOffspring (Signal.USR1, new String[] {
 				       getExecPath ("funit-rt-stepper"),
 				       "" + Pid.get (),
-				       "" + Sig.USR1_
+				       Signal.USR1.toString()
 				   });
   myTask = process.findTaskUsingRefresh(true);
   myProc = myTask.getProc();
diff --git a/frysk-core/frysk/event/ChangeLog b/frysk-core/frysk/event/ChangeLog
index 4eb7b01..478a02f 100644
--- a/frysk-core/frysk/event/ChangeLog
+++ b/frysk-core/frysk/event/ChangeLog
@@ -1,3 +1,13 @@
+2007-12-04  Andrew Cagney  <cagney@redhat.com>
+
+	Merge frysk.sys.Sig into frysk.sys.Signal.
+	* PollEventLoop.java: Update.
+	* EventLoop.java: Update.
+	* SignalEvent.java: Update.
+	* EventLoopTestBed.java: Update.
+	* TestSigChild.java: Update.
+	* WaitEventLoop.java: Update.
+
 2007-11-28  Tim Moore  <timoore@redhat.com>
 
 	* EventLoop.java (run, start, running) Loop around the wait,
diff --git a/frysk-core/frysk/event/EventLoop.java b/frysk-core/frysk/event/EventLoop.java
index bf62450..e44212e 100644
--- a/frysk-core/frysk/event/EventLoop.java
+++ b/frysk-core/frysk/event/EventLoop.java
@@ -39,7 +39,7 @@
 
 package frysk.event;
 
-import frysk.sys.Sig;
+import frysk.sys.Signal;
 import frysk.sys.Tid;
 import frysk.sys.WaitBuilder;
 import java.util.HashMap;
@@ -61,15 +61,15 @@ public abstract class EventLoop
     protected static Logger logger = Logger.getLogger("frysk");
 
     /**
-     * The EventLoop uses Sig.IO to wake up, or unblock, the
+     * The EventLoop uses Signal.IO to wake up, or unblock, the
      * event-loop thread when a request comes in.
      */
     protected EventLoop()
     {
 	signalEmpty ();
-	// Sig.IO is used to wake up a blocked event loop when an
+	// Signal.IO is used to wake up a blocked event loop when an
 	// asynchronous event arrives.
-	signalAdd (Sig.IO);
+	signalAdd(Signal.IO);
 	logger.log (Level.FINE, "{0} new\n", this); 
     }
 
@@ -79,9 +79,9 @@ public abstract class EventLoop
      */
     protected abstract void signalEmpty();
     /**
-     * Add Sig to the signals that can be received.
+     * Add Signal to the signals that can be received.
      */
-    protected abstract void signalAdd(Sig sig);
+    protected abstract void signalAdd(Signal sig);
 
 
     /**
@@ -98,7 +98,7 @@ public abstract class EventLoop
     /**
      * The EventLoop's thread ID.  If a thread, other than the
      * EventLoop thread modifies any of the event queues, the event
-     * thread will need to be woken up using a Sig.IO.
+     * thread will need to be woken up using a Signal.IO.
      */
     private int tid = -1; // can change once
     final boolean isCurrentThread()
@@ -116,7 +116,7 @@ public abstract class EventLoop
 	// wasn't set.
 	if (tid <= 0)
 	    throw new RuntimeException ("EventLoop.tid botch");
-	frysk.sys.Signal.tkill (tid, Sig.IO);
+	Signal.IO.tkill(tid);
     }
     private Exception firstSet;
     private void updateTid()
@@ -240,10 +240,10 @@ public abstract class EventLoop
     {
 	logger.log (Level.FINEST, "{0} add SignalEvent {1}\n",
 		    new Object[] { this, signalEvent });
-	Object old = signalHandlers.put (signalEvent.getSig (), signalEvent);
+	Object old = signalHandlers.put (signalEvent.getSignal(), signalEvent);
 	if (old == null)
 	    // New signal, tell Poll.
-	    signalAdd (signalEvent.getSig ());
+	    signalAdd (signalEvent.getSignal());
 	wakeupIfBlocked ();
     }
     /**
@@ -253,7 +253,7 @@ public abstract class EventLoop
     public synchronized void remove (SignalEvent signalEvent)
     {
 	logger.log (Level.FINE, "{0} remove SignalEvent\n", this); 
-	signalHandlers.remove (signalEvent.getSig ());
+	signalHandlers.remove (signalEvent.getSignal());
 	// XXX: Poll.SignalSet.remove (sig.signal);
     }
     /**
@@ -262,8 +262,7 @@ public abstract class EventLoop
      * signal delivery un-blocks the poll, the event thread is no
      * longer going to block.
      */
-    protected synchronized void processSignal (Sig sig)
-    {
+    protected synchronized void processSignal(Signal sig) {
 	logger.log (Level.FINEST, "{0} processSignal Sig\n", this); 
 	SignalEvent handler = (SignalEvent) signalHandlers.get (sig);
 	if (handler != null)
diff --git a/frysk-core/frysk/event/EventLoopTestBed.java b/frysk-core/frysk/event/EventLoopTestBed.java
index ebdee1e..7183c89 100644
--- a/frysk-core/frysk/event/EventLoopTestBed.java
+++ b/frysk-core/frysk/event/EventLoopTestBed.java
@@ -40,7 +40,6 @@
 package frysk.event;
 
 import frysk.sys.Signal;
-import frysk.sys.Sig;
 import frysk.sys.Tid;
 import frysk.junit.TestCase;
 
@@ -66,10 +65,8 @@ abstract class EventLoopTestBed
     public void setUp ()
     {
 	eventLoop = newEventLoop ();
-	eventLoop.add (new SignalEvent (Sig.INT)
-	    {
-		public void execute ()
-		{
+	eventLoop.add(new SignalEvent(Signal.INT) {
+		public void execute () {
 		    fail ("Got CNTRL-C");
 		}
 	    });
@@ -83,8 +80,8 @@ abstract class EventLoopTestBed
     {
 	// Make certain that the event loop died.
 	eventLoop.requestStop();
-	Signal.drain (Sig.USR1);
-	Signal.drain (Sig.CHLD);
+	Signal.USR1.drain();
+	Signal.CHLD.drain();
     }
 
     /**
@@ -108,10 +105,10 @@ abstract class EventLoopTestBed
 				  0, count.numberOfSignalEvents);
 		    assertEquals ("count.numberOfTimerEvents",
 				  1, count.numberOfTimerEvents);
-		    Signal.tkill (eventTid, Sig.USR1);
+		    Signal.USR1.tkill(eventTid);
 		}
 	    });
-	eventLoop.add (new SignalEvent (Sig.USR1)
+	eventLoop.add (new SignalEvent (Signal.USR1)
 	    {
 		Counters count = counters;
 		public void execute ()
@@ -306,7 +303,7 @@ abstract class EventLoopTestBed
 	class SignalFired 
 	    extends SignalEvent
 	{
-	    SignalFired (Sig sig)
+	    SignalFired (Signal sig)
 	    {
 		super (sig);
 	    }
@@ -317,22 +314,22 @@ abstract class EventLoopTestBed
 		eventLoop.requestStop ();		
 	    }
 	}
-	SignalFired handler = new SignalFired (Sig.CHLD);
+	SignalFired handler = new SignalFired (Signal.CHLD);
 
 	// Add a handler for SIGCHILD, shoot the signal (which makes
 	// it pending since there is a handler), and then run the loop
 	// checking that it did, indeed fire.
 	eventLoop.add (handler);
-	Signal.tkill (eventTid, Sig.CHLD);
+	Signal.CHLD.tkill(eventTid);
 	eventLoop.runPolling (0);
-	assertEquals ("One Sig.CHLD was received.", 1, handler.count);
+	assertEquals ("One Signal.CHLD was received.", 1, handler.count);
 
 	// Remove the handler, send a further signal, check that it
 	// wasn't received.
 	eventLoop.remove (handler);
-	Signal.tkill (eventTid, Sig.CHLD);
+	Signal.CHLD.tkill(eventTid);
 	eventLoop.runPolling (0);
-	assertEquals ("Still only one Sig.CHLD (no additions).",
+	assertEquals ("Still only one Signal.CHLD (no additions).",
 		      1, handler.count);
 	
 	// Re-add the CHLD handler, but this time twice - the
@@ -340,15 +337,15 @@ abstract class EventLoopTestBed
 	// receiving signal events.
 	eventLoop.add (handler);
 	eventLoop.add (handler);
-	Signal.tkill (eventTid, Sig.CHLD);
+	Signal.CHLD.tkill(eventTid);
 	eventLoop.runPolling (0);
-	assertEquals ("Second Sig.CHLD received.", 2, handler.count);
+	assertEquals ("Second Signal.CHLD received.", 2, handler.count);
 
 	// Finally remove the handler and again check no signal was
 	// received (if the handler was duplicated in the signal pool
 	// then it might still see the signal).
 	eventLoop.remove (handler);
-	Signal.tkill (eventTid, Sig.CHLD);
+	Signal.CHLD.tkill(eventTid);
 	eventLoop.runPolling (0);
 	assertEquals ("No further SIGCHLDs.", 2, handler.count);
     }
@@ -363,10 +360,10 @@ abstract class EventLoopTestBed
      */
     public void testAsync ()
     {
-	// Set up a dummy Sig.CHLD handler, this should never occur
+	// Set up a dummy Signal.CHLD handler, this should never occur
 	// as it is overridden by an asynchronous thread before the
 	// signal is delivered.
-	eventLoop.add (new SignalEvent (Sig.CHLD)
+	eventLoop.add (new SignalEvent (Signal.CHLD)
 	    {
 		public void execute ()
 		{
@@ -428,14 +425,14 @@ abstract class EventLoopTestBed
     {
 	public void run ()
 	{
-	    eventLoop.add (new SignalEvent (Sig.CHLD)
+	    eventLoop.add (new SignalEvent (Signal.CHLD)
 		{
 		    public void execute ()
 		    {
 			new SleepThread ().start ();
 		    }
 		});
-	    Signal.tkill (eventTid, Sig.CHLD);
+	    Signal.CHLD.tkill(eventTid);
 	}
     }
     /**
@@ -454,7 +451,7 @@ abstract class EventLoopTestBed
 		fail ("sleep interrupted");
 	    }
 	    eventLoop.add (new RequestStopEvent(eventLoop));
-	    Signal.tkill (eventTid, Sig.CHLD);
+	    Signal.CHLD.tkill(eventTid);
 	}
     }
 
diff --git a/frysk-core/frysk/event/PollEventLoop.java b/frysk-core/frysk/event/PollEventLoop.java
index e9d6a3f..91e06bb 100644
--- a/frysk-core/frysk/event/PollEventLoop.java
+++ b/frysk-core/frysk/event/PollEventLoop.java
@@ -41,7 +41,7 @@ package frysk.event;
 
 import frysk.sys.Poll;
 import frysk.sys.PollBuilder;
-import frysk.sys.Sig;
+import frysk.sys.Signal;
 import frysk.sys.Wait;
 import frysk.sys.WaitBuilder;
 import java.util.logging.Level;
@@ -57,8 +57,7 @@ class PollEventLoop
     {
 	Poll.empty ();
     }
-    protected void signalAdd(Sig sig)
-    {
+    protected void signalAdd(Signal sig) {
 	Poll.add(sig);
     }
 
@@ -89,7 +88,7 @@ class PollEventLoop
 	    final WaitBuilder waitBuilder;
 	    PollWaitOnSigChild (WaitBuilder waitBuilder)
 	    {
-		super(Sig.CHLD);
+		super(Signal.CHLD);
 		this.waitBuilder = waitBuilder;
 		logger.log(Level.FINE, "{0} PollWaitOnSigChld\n", this);
 	    }
@@ -108,7 +107,7 @@ class PollEventLoop
 	    {
 		return ("{" + super.toString () + "}");
 	    }
-	    public void signal (Sig sig) {
+	    public void signal(Signal sig) {
 		logger.log (Level.FINEST, "{0} PollBuilder.signal Sig\n", this); 
 		processSignal (sig);
 	    }
diff --git a/frysk-core/frysk/event/SignalEvent.java b/frysk-core/frysk/event/SignalEvent.java
index 85166f9..f8cc4c3 100644
--- a/frysk-core/frysk/event/SignalEvent.java
+++ b/frysk-core/frysk/event/SignalEvent.java
@@ -39,29 +39,25 @@
 
 package frysk.event;
 
-import frysk.sys.Sig;
+import frysk.sys.Signal;
 
 /**
  * An event due to a signal.
  */
 
-public abstract class SignalEvent
-    implements Event
-{
-    private final Sig sig;
+public abstract class SignalEvent implements Event {
+    private final Signal sig;
     /**
      * Return the corresponding signal; the sig can be used as a
      * search key.
      */
-    public Sig getSig ()
-    {
+    public Signal getSignal() {
 	return sig;
     }
     /**
      * Create a Signal based event.
      */
-    public SignalEvent (Sig sig)
-    {
+    public SignalEvent(Signal sig) {
 	this.sig = sig;
     }
     /**
diff --git a/frysk-core/frysk/event/TestSigChild.java b/frysk-core/frysk/event/TestSigChild.java
index f8abc4e..117048a 100644
--- a/frysk-core/frysk/event/TestSigChild.java
+++ b/frysk-core/frysk/event/TestSigChild.java
@@ -39,7 +39,7 @@
 
 package frysk.event;
 
-import frysk.sys.Sig;
+import frysk.sys.Signal;
 import frysk.junit.TestCase;
 
 /**
@@ -53,10 +53,8 @@ public class TestSigChild
     public void stackDump ()
     {
 	EventLoop eventLoop = new PollEventLoop ();
-	eventLoop.add (new SignalEvent (Sig.CHLD)
-	    {
-		public final void execute ()
-		{
+	eventLoop.add (new SignalEvent (Signal.CHLD) {
+		public final void execute () {
 		}
 	    });
 	new RuntimeException ().getStackTrace ();
diff --git a/frysk-core/frysk/event/WaitEventLoop.java b/frysk-core/frysk/event/WaitEventLoop.java
index c33a626..9898d25 100644
--- a/frysk-core/frysk/event/WaitEventLoop.java
+++ b/frysk-core/frysk/event/WaitEventLoop.java
@@ -42,7 +42,7 @@ package frysk.event;
 import frysk.sys.Wait;
 import frysk.sys.WaitBuilder;
 import frysk.sys.SignalBuilder;
-import frysk.sys.Sig;
+import frysk.sys.Signal;
 import java.util.logging.Level;
 
 /**
@@ -56,7 +56,7 @@ class WaitEventLoop
     {
 	Wait.signalEmpty ();
     }
-    protected void signalAdd(Sig sig)
+    protected void signalAdd(Signal sig)
     {
 	Wait.signalAdd(sig);
     }
@@ -70,7 +70,7 @@ class WaitEventLoop
 
     private SignalBuilder signalBuilder = new SignalBuilder ()
 	{
-	    public void signal (Sig sig)
+	    public void signal (Signal sig)
 	    {
 	      if (logger.isLoggable(Level.FINEST))
 		{
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 1970598..2f4412a 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-04  Andrew Cagney  <cagney@redhat.com>
+
+	Merge frysk.sys.Sig into frysk.sys.Signal.
+	* QuitCommand.java: Update.
+
 2007-11-29  Rick Moseley  <rmoseley@redhat.com>
 
 	* RunCommand.java: Added code to implement the ability to run
diff --git a/frysk-core/frysk/hpd/QuitCommand.java b/frysk-core/frysk/hpd/QuitCommand.java
index 4bb3e14..5d08f31 100644
--- a/frysk-core/frysk/hpd/QuitCommand.java
+++ b/frysk-core/frysk/hpd/QuitCommand.java
@@ -45,7 +45,6 @@ import frysk.event.Request;
 import frysk.proc.Manager;
 import frysk.proc.Proc;
 import frysk.sys.Signal;
-import frysk.sys.Sig;
 import frysk.util.CountDownLatch;
 import java.util.List;
 
@@ -67,7 +66,7 @@ class QuitCommand extends ParameterizedCommand {
             for (Iterator iterator = cli.runningProcs.iterator();
 		 iterator.hasNext();) {
                 Proc p = (Proc) iterator.next();


hooks/post-receive
--
frysk system monitor/debugger



More information about the Frysk-cvs mailing list