public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: frysk@sourceware.org
Subject: Creating test children and daemons
Date: Tue, 13 Feb 2007 14:22:00 -0000	[thread overview]
Message-ID: <45D1C970.1020501@redhat.com> (raw)

FYI,

I've committed new code for creating test child (direct decendant of 
TestRunner) and daemon (descendant of process 1, a.k.a. init) 
processes.  The processes can either run code linked in code, or a 
separate process (started via exec).  For instance, and off the top of 
my head, to create a daemon that just exits:

   frysk.sys.ProcessIdentifier pid =
    new frysk.sys.Daemon (new frysk.sys.Execute ()
       {
          public void execute ()
          {
             // This as the main and only thread of the daemon.
             // Beware, there is no java runtime so
             // you really want to implement this as a native
             // method in either C or assembler.
          }
       });

Redirection to a pipe pair is also possible, instead of 
frysk.sys.Daemon, call frysk.sys.DaemonPipePair.  See 
frysk.sys.TestPipePair for more examples.

Andrew

                 reply	other threads:[~2007-02-13 14:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45D1C970.1020501@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).