Bug 1891

Summary: Pass the main task, and not the process, as the forked observer param
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Andrew Cagney <cagney>
Severity: normal    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1516    

Description Andrew Cagney 2005-11-20 18:21:00 UTC
All the code I've looked at ends up calling Proc.getTasks().getFirst() to pull
out the main task.  Might as well give clients want they want.
Comment 1 Andrew Cagney 2005-11-20 19:35:48 UTC
Index: frysk-core/frysk/proc/ChangeLog
2005-11-20  Andrew Cagney  <cagney@redhat.com>

        * LinuxHost.java: Pass the forked process's only task to Task
        * TaskObserver.java: Change .Forked.updateForked fork parameter to
        a Task.
        * TaskState.java: Update.
        * Task.java: Update.

Index: frysk-gui/frysk/gui/monitor/ChangeLog
2005-11-20  Andrew Cagney  <cagney@redhat.com>

        * observers/TaskForkedObserver.java: Update,
        frysk.proc.TaskObserver .Forked .updateForked passes in the
        processes Task.
        * EventLogger.java: Ditto.
Comment 2 Andrew Cagney 2005-11-20 20:15:07 UTC
Resultant cleanup

Index: frysk-core/frysk/proc/ChangeLog
2005-11-20  Andrew Cagney  <cagney@redhat.com>

        * Task.java: Refactor single constructor into separate unattached,
        attached clone, and attached main constructors.
        * Proc.java: Re-organize constructor code.  Delete
        * LinuxTask.java: Ditto.
        * LinuxProc.java: Update.
        * LinuxHost.java: Update.  Explicitly create an attached processes
        first task.