summaryrefslogtreecommitdiff
path: root/epoc/epocish.c
diff options
context:
space:
mode:
Diffstat (limited to 'epoc/epocish.c')
-rw-r--r--epoc/epocish.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/epoc/epocish.c b/epoc/epocish.c
new file mode 100644
index 0000000000..134eaef0e0
--- /dev/null
+++ b/epoc/epocish.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 1999 Olaf Flebbe o.flebbe@gmx.de
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file.
+ *
+ */
+
+/* This is indeed C++ Code !! */
+
+#include <e32std.h>
+
+extern "C" {
+
+epoc_spawn( char *cmd, char *cmdline) {
+ RProcess p;
+ TRequestStatus status;
+ TInt rc;
+
+ rc = p.Create( _L( cmd), _L( cmdline));
+ if (rc != KErrNone)
+ return -1;
+
+ p.Resume();
+
+ p.Logon( status);
+ User::WaitForRequest( status);
+ if (status!=KErrNone) {
+ return -1;
+ }
+ return 0;
+}
+
+}