Commit | Line | Data |
---|---|---|
3a2f06e9 GS |
1 | /* |
2 | * Copyright (c) 1999 Olaf Flebbe o.flebbe@gmx.de | |
3 | * | |
4 | * You may distribute under the terms of either the GNU General Public | |
5 | * License or the Artistic License, as specified in the README file. | |
6 | * | |
7 | */ | |
8 | ||
9 | /* This is indeed C++ Code !! */ | |
10 | ||
11 | #include <e32std.h> | |
12 | ||
13 | extern "C" { | |
14 | ||
15 | epoc_spawn( char *cmd, char *cmdline) { | |
16 | RProcess p; | |
17 | TRequestStatus status; | |
18 | TInt rc; | |
19 | ||
20 | rc = p.Create( _L( cmd), _L( cmdline)); | |
21 | if (rc != KErrNone) | |
22 | return -1; | |
23 | ||
24 | p.Resume(); | |
25 | ||
26 | p.Logon( status); | |
27 | User::WaitForRequest( status); | |
28 | if (status!=KErrNone) { | |
29 | return -1; | |
30 | } | |
31 | return 0; | |
32 | } | |
33 | ||
34 | } |