public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Delete sys/Exec.
@ 2008-05-22 20:43 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-05-22 20:43 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  bba3683f7288ea6129dc0139762184dff45dca37 (commit)
       via  87fc8aa62bec913f4868c40a91ea75fad6412f4a (commit)
      from  63e361f21e2103269df51c27eeac3a71ac0b55a6 (commit)

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

- Log -----------------------------------------------------------------
commit bba3683f7288ea6129dc0139762184dff45dca37
Author: Andrew Cagney <cagney@redhat.com>
Date:   Thu May 22 16:41:45 2008 -0400

    Delete sys/Exec.
    
    frysk-sys/frysk/sys/ChangeLog
    2008-05-22  Andrew Cagney  <cagney@redhat.com>
    
    	* jni/Exec.cxx: Delete.
    	* cni/Exec.cxx: Delete.
    	* Exec.java: Delete.

commit 87fc8aa62bec913f4868c40a91ea75fad6412f4a
Author: Andrew Cagney <cagney@redhat.com>
Date:   Thu May 22 16:35:52 2008 -0400

    Delete DaemonFactory and ChildFactory; replaced by ForkFactory.
    
    frysk-sys/frysk/sys/ChangeLog
    2008-05-22  Andrew Cagney  <cagney@redhat.com>
    
    	* jni/ChildFactory.cxx: Delete.
    	* cni/ChildFactory.cxx: Delete.
    	* ChildFactory.java: Delete.
    	* jni/DaemonFactory.cxx: Delete.
    	* cni/DaemonFactory.cxx: Delete.
    	* DaemonFactory.java: Delete.
    
    frysk-sys/frysk/sys/ptrace/ChangeLog
    2008-05-22  Andrew Cagney  <cagney@redhat.com>
    
    	* TestPtrace.java: Replace DaemonFactory with ForkFactory.

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

Summary of changes:
 frysk-sys/frysk/sys/ChangeLog              |   11 +++
 frysk-sys/frysk/sys/ChildFactory.java      |   72 -------------------
 frysk-sys/frysk/sys/DaemonFactory.java     |   77 --------------------
 frysk-sys/frysk/sys/Exec.java              |   61 ----------------
 frysk-sys/frysk/sys/cni/ChildFactory.cxx   |   80 ---------------------
 frysk-sys/frysk/sys/cni/DaemonFactory.cxx  |  106 ----------------------------
 frysk-sys/frysk/sys/cni/Exec.cxx           |   69 ------------------
 frysk-sys/frysk/sys/jni/ChildFactory.cxx   |   40 -----------
 frysk-sys/frysk/sys/jni/DaemonFactory.cxx  |  101 --------------------------
 frysk-sys/frysk/sys/jni/Exec.cxx           |   40 -----------
 frysk-sys/frysk/sys/ptrace/ChangeLog       |    4 +
 frysk-sys/frysk/sys/ptrace/TestPtrace.java |   10 +--
 12 files changed, 17 insertions(+), 654 deletions(-)
 delete mode 100644 frysk-sys/frysk/sys/ChildFactory.java
 delete mode 100644 frysk-sys/frysk/sys/DaemonFactory.java
 delete mode 100644 frysk-sys/frysk/sys/Exec.java
 delete mode 100644 frysk-sys/frysk/sys/cni/ChildFactory.cxx
 delete mode 100644 frysk-sys/frysk/sys/cni/DaemonFactory.cxx
 delete mode 100644 frysk-sys/frysk/sys/cni/Exec.cxx
 delete mode 100644 frysk-sys/frysk/sys/jni/ChildFactory.cxx
 delete mode 100644 frysk-sys/frysk/sys/jni/DaemonFactory.cxx
 delete mode 100644 frysk-sys/frysk/sys/jni/Exec.cxx

First 500 lines of diff:
diff --git a/frysk-sys/frysk/sys/ChangeLog b/frysk-sys/frysk/sys/ChangeLog
index 8e0b43d..3515ed5 100644
--- a/frysk-sys/frysk/sys/ChangeLog
+++ b/frysk-sys/frysk/sys/ChangeLog
@@ -1,5 +1,16 @@
 2008-05-22  Andrew Cagney  <cagney@redhat.com>
 
+	* jni/Exec.cxx: Delete.
+	* cni/Exec.cxx: Delete.
+	* Exec.java: Delete.
+
+	* jni/ChildFactory.cxx: Delete.
+	* cni/ChildFactory.cxx: Delete.
+	* ChildFactory.java: Delete.
+	* jni/DaemonFactory.cxx: Delete.
+	* cni/DaemonFactory.cxx: Delete.
+	* DaemonFactory.java: Delete.
+
 	* PipePair.java (daemon, child): New factory methods.
 	* cni/PipePair.cxx: New.
 	* jni/PipePair.cxx: New.
diff --git a/frysk-sys/frysk/sys/ChildFactory.java b/frysk-sys/frysk/sys/ChildFactory.java
deleted file mode 100644
index 8be6ea1..0000000
--- a/frysk-sys/frysk/sys/ChildFactory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2005, 2006, 2007, 2008, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-package frysk.sys;
-
-public class ChildFactory {
-    /**
-     * Create a child process (direct decendant of this process) that
-     * redirects its I/O to REDIRECT, and executes EXEC.
-     *
-     * Private.
-     */
-    private static native ProcessIdentifier child(Redirect redirect,
-						  Execute exec);
-    /**
-     * Create a child wired to IO redirect, running exec.
-     *
-     * Package private.
-     */
-    public static ProcessIdentifier create(Redirect redirect, Execute exec) {
-	return child(redirect, exec);
-    }
-    /**
-     * Create a child wired to nothing; STDIN is closed, STDOUT/ERROR
-     * are the same as for this process.
-     */
-    public static ProcessIdentifier create(Execute exec) {
-	return create(new Redirect() {
-		protected void reopen() {
-		    FileDescriptor.in.close ();
-		}
-		protected void close() {
-		}
-	    }, exec);
-    }
-}
diff --git a/frysk-sys/frysk/sys/DaemonFactory.java b/frysk-sys/frysk/sys/DaemonFactory.java
deleted file mode 100644
index 4941eaf..0000000
--- a/frysk-sys/frysk/sys/DaemonFactory.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2007, 2008, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-package frysk.sys;
-
-/**
- * Spawns a daemon-process, a.k.a. a process with init or process 1 as
- * the parent.
- */
-
-public class DaemonFactory {
-    /**
-     * Create a daemon process (child of process 1 a.k.a. init) that
-     * redirects its I/O to REDIRECT, and executes EXEC.
-     *
-     * Private.
-     */
-    private static native ProcessIdentifier daemon(Redirect redirect,
-						   Execute exec);
-
-    /**
-     * Create a daemon wired to REDIRECT, and running EXEC.
-     */
-    public static ProcessIdentifier create(Redirect redirect, Execute exec) {
-	return daemon(redirect, exec);
-    }
-
-    /**
-     * Create a daemon wired to nothing; STDIN is closed, STDOUT/ERROR
-     * are the same as for this process.
-     */
-    public static ProcessIdentifier create(Execute exec) {
-	return create(new Redirect() {
-		protected void reopen() {
-		    FileDescriptor.in.close();
-		}
-		protected void close() {
-		}
-	    }, exec);
-    }
-}
diff --git a/frysk-sys/frysk/sys/Exec.java b/frysk-sys/frysk/sys/Exec.java
deleted file mode 100644
index df2663a..0000000
--- a/frysk-sys/frysk/sys/Exec.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2007, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-package frysk.sys;
-
-/**
- * Local class, used to perform an exec call after a fork.
- */
-final class Exec
-    implements Execute
-{
-    protected String file;
-    protected String[] argv;
-    Exec (String file, String[] argv)
-    {
-	this.file = file;
-	this.argv = argv;
-    }
-    Exec (String[] argv)
-    {
-	this.file = argv[0];
-	this.argv = argv;
-    }
-    public native void execute ();
-}
diff --git a/frysk-sys/frysk/sys/cni/ChildFactory.cxx b/frysk-sys/frysk/sys/cni/ChildFactory.cxx
deleted file mode 100644
index 4c5ef9b..0000000
--- a/frysk-sys/frysk/sys/cni/ChildFactory.cxx
+++ /dev/null
@@ -1,80 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2007, 2008, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-#include <stdio.h>
-#include <alloca.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/ptrace.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include <gcj/cni.h>
-
-#include "frysk/sys/cni/Errno.hxx"
-#include "frysk/sys/ProcessIdentifier.h"
-#include "frysk/sys/ProcessIdentifierFactory.h"
-#include "frysk/sys/ProcessIdentifierDecorator.h"
-#include "frysk/sys/ChildFactory.h"
-#include "frysk/sys/Redirect.h"
-#include "frysk/sys/Execute.h"
-
-frysk::sys::ProcessIdentifier*
-frysk::sys::ChildFactory::child (frysk::sys::Redirect* redirect,
-				 frysk::sys::Execute* exec)
-{
-  // Fork/exec
-  errno = 0;
-  pid_t pid = fork ();
-  switch (pid) {
-  case -1:
-    // Fork failed.
-    throwErrno (errno, "fork");
-  case 0:
-    // Child
-    // ::fprintf (stderr, "%d child calls reopen\n", getpid ());
-    redirect->reopen ();
-    // ::fprintf (stderr, "%d child calls execute\n", getpid ());
-    exec->execute ();
-    ::_exit (0);
-  default:
-    redirect->close ();
-    return frysk::sys::ProcessIdentifierFactory::create(pid);
-  }
-}
diff --git a/frysk-sys/frysk/sys/cni/DaemonFactory.cxx b/frysk-sys/frysk/sys/cni/DaemonFactory.cxx
deleted file mode 100644
index 46b8a53..0000000
--- a/frysk-sys/frysk/sys/cni/DaemonFactory.cxx
+++ /dev/null
@@ -1,106 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2007, 2008, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-#include <stdio.h>
-#include <alloca.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/ptrace.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include <gcj/cni.h>
-
-#include "frysk/sys/cni/Errno.hxx"
-#include "frysk/sys/ProcessIdentifier.h"
-#include "frysk/sys/ProcessIdentifierFactory.h"
-#include "frysk/sys/ProcessIdentifierDecorator.h"
-#include "frysk/sys/DaemonFactory.h"
-#include "frysk/sys/Redirect.h"
-#include "frysk/sys/Execute.h"
-
-frysk::sys::ProcessIdentifier*
-frysk::sys::DaemonFactory::daemon(frysk::sys::Redirect* redirect,
-				  frysk::sys::Execute* exec)
-{
-  volatile int pid = -1;
-
-  // This is executed by the child with the parent blocked, the final
-  // process id ends up in PID.
-  errno = 0;
-  register int v = vfork ();
-  switch (v) {
-  case -1:
-    throwErrno (errno, "vfork");
-  case 0:
-    // vforked child
-    // ::fprintf (stderr, "%d is vfork child\n", getpid ());
-    pid = fork ();
-    switch (pid) {
-    case -1:
-      // error handled by parent; look for pid<0.
-      _exit (0);
-    case 0:
-      // ::fprintf (stderr, "%d child calls redirect\n", getpid ());
-      redirect->reopen ();
-      // ::fprintf (stderr, "%d child calls execute\n", getpid ());
-      exec->execute ();
-      _exit (0);
-    default:
-      _exit (0);
-    }
-  default:
-    // Reach here after the vfork child - or middle player - exits.
-    // Save the fork's error status.
-    int fork_errno = errno;
-    // Consume the middle players wait.
-    errno = 0;
-    pid_t wpid = ::waitpid (v, NULL, 0);
-    int wait_errno = errno;
-    // Did the fork succeed?  If not throw its status.
-    if (pid < 0)
-      throwErrno (fork_errno, "fork");
-    // Did the wait succeed?  If not throw its status.
-    if (wpid < 0)
-      throwErrno (wait_errno, "waitpid", "process %d", v);
-    // printf ("v %d pid %d\n", v, pid);
-    redirect->close ();
-    return frysk::sys::ProcessIdentifierFactory::create(pid);
-  }
-}
diff --git a/frysk-sys/frysk/sys/cni/Exec.cxx b/frysk-sys/frysk/sys/cni/Exec.cxx
deleted file mode 100644
index a48e49f..0000000
--- a/frysk-sys/frysk/sys/cni/Exec.cxx
+++ /dev/null
@@ -1,69 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2007, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-#include <stdio.h>
-#include <errno.h>
-#include <alloca.h>
-#include <unistd.h>
-#include <signal.h>
-
-#include <gcj/cni.h>
-


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-22 20:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-22 20:43 [SCM] master: Delete sys/Exec cagney

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).