diff --git a/core/org.eclipse.cdt.core.linux/.classpath b/core/org.eclipse.cdt.core.linux/.classpath
index 782d615590a..78b54289e10 100644
--- a/core/org.eclipse.cdt.core.linux/.classpath
+++ b/core/org.eclipse.cdt.core.linux/.classpath
@@ -1,5 +1,6 @@
+
@@ -11,5 +12,5 @@
-
+
diff --git a/core/org.eclipse.cdt.core.linux/fragment.xml b/core/org.eclipse.cdt.core.linux/fragment.xml
index 0f322b53cca..5df310e5c5b 100644
--- a/core/org.eclipse.cdt.core.linux/fragment.xml
+++ b/core/org.eclipse.cdt.core.linux/fragment.xml
@@ -17,4 +17,10 @@
+
+
+
+
diff --git a/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessInfo.java b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessInfo.java
new file mode 100644
index 00000000000..597c9e408fa
--- /dev/null
+++ b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessInfo.java
@@ -0,0 +1,45 @@
+package org.eclipse.cdt.internal.core.linux;
+
+import org.eclipse.cdt.core.IProcessInfo;
+
+/**
+ * @author alain
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class ProcessInfo implements IProcessInfo {
+
+ int pid;
+ String name;
+
+ public ProcessInfo(String pidString, String name) {
+ try {
+ pid = Integer.parseInt(pidString);
+ } catch (NumberFormatException e) {
+ }
+ this.name = name;
+ }
+
+ public ProcessInfo(int pid, String name) {
+ this.pid = pid;
+ this.name = name;
+ }
+
+ /**
+ * @see org.eclipse.cdt.core.IProcessInfo#getName()
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @see org.eclipse.cdt.core.IProcessInfo#getPid()
+ */
+ public int getPid() {
+ return pid;
+ }
+
+}
diff --git a/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java
new file mode 100644
index 00000000000..9455cd15c89
--- /dev/null
+++ b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java
@@ -0,0 +1,73 @@
+package org.eclipse.cdt.internal.core.linux;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FilenameFilter;
+import java.io.IOException;
+
+import org.eclipse.cdt.core.IProcessInfo;
+import org.eclipse.cdt.core.IProcessList;
+
+/**
+ * Insert the type's description here.
+ * @see IProcessList
+ */
+public class ProcessList implements IProcessList {
+
+ ProcessInfo[] empty = new ProcessInfo[0];
+
+ public ProcessList() {
+ }
+
+ /**
+ * Insert the method's description here.
+ * @see IProcessList#getProcessList
+ */
+ public IProcessInfo [] getProcessList() {
+ File proc = new File("/proc");
+ File[] pidFiles = null;
+ String[] pidNames = null;
+
+ // We are only interrested in the pid so filter the rest out.
+ try {
+ FilenameFilter filter = new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ boolean isPID = false;
+ try {
+ int pid = Integer.parseInt(name);
+ isPID = true;
+ } catch (NumberFormatException e) {
+ }
+ return isPID;
+ }
+ };
+ pidFiles = proc.listFiles(filter);
+ } catch (SecurityException e) {
+ }
+
+ ProcessInfo[] processInfo = empty;
+ if (pidFiles != null) {
+ processInfo = new ProcessInfo[pidFiles.length];
+ for (int i = 0; i < pidFiles.length; i++) {
+ File cmdLine = new File(pidFiles[i], "cmdline");
+ StringBuffer line = new StringBuffer();
+ try {
+ FileReader reader = new FileReader(cmdLine);
+ int c;
+ while ((c = reader.read()) > 0) {
+ line.append((char)c);
+ }
+ } catch (IOException e) {
+ }
+ String name = line.toString();
+ if (name.length() == 0) {
+ name = "Unknown";
+ }
+ processInfo[i] = new ProcessInfo(pidFiles[i].getName(), name);
+ }
+ } else {
+ pidFiles = new File[0];
+ }
+ return processInfo;
+ }
+}