Bug 1858 - blocking the cloner should also block the clonee
Summary: blocking the cloner should also block the clonee
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on:
Blocks: 1857
  Show dependency treegraph
 
Reported: 2005-11-11 19:00 UTC by Andrew Cagney
Modified: 2005-11-21 01:02 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2005-11-11 19:00:12 UTC
this gives the cloner observer a clear well defined oportunity to add things to
the clonee.
Comment 1 Andrew Cagney 2005-11-20 22:02:16 UTC
Work in progress, this moves the block.

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

        * TaskState.java: Replace state .startRunning with class .Starting
        containing sub-states .waitingForStop and .waitingForUnblock.
        * Task.java: In notifyForked, add blocking observer to fork's
        list.  Similar for notifyCloned.
        * TestTaskForkedObserver.java: Update, also unblock the fork.
        * TestTaskClonedObserver.java: Update, also unblock the clone.
Comment 2 Andrew Cagney 2005-11-21 01:00:42 UTC
2005-11-20  Andrew Cagney  <cagney@redhat.com>

        * TestTaskObserver.java: Add classes .SpawnObserver, and
        .CloneObserver.  Add tests .testBlockedCloneUnblockChildFirst, and
        .testBlockedCloneUnblockParentFirst.
        * TaskObserver.java: Note that Cloned and Forked will block both
        the parent and child.

        * TestLib.java: Add constants childAck, parentAck, addCloneSig,
        delCloneSig, addForkSig, delForkSig, zombieForkSig, execSig to
        AckProcess.  Use.

        * TaskState.java: Replace state .startRunning with class .Starting
        containing sub-states .waitingForStop and .waitingForUnblock.
        * Task.java: In notifyForked, add blocking observer to fork's
        list.  Similar for notifyCloned.
        * TestTaskForkedObserver.java: Update, also unblock the fork.
        * TestTaskClonedObserver.java: Update, also unblock the clone.

        * TaskState.java: Fix typo's, zombied -> disappeared.

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

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

Comment 3 Andrew Cagney 2005-11-21 01:02:25 UTC
        /**
         * Called when this TASK has cloned, creating CLONE.  Return
         * Action.BLOCK if this observer wants both this task and it's
         * clone to be blocked (each must be separatly unblocked).
         */
        Action updateCloned (Task task, Task clone);