I'm using TFindProcess to make sure that I'm not running the same console app twice:

Code:
_LIT(KtxApplicationFileName, "MyApp");
    TBool Ret(EFalse);

    TFileName res;
    TFindProcess find;
    while( find.Next(res) == KErrNone) {
        RProcess ph;
        ph.Open(res);

        if(ph.FileName().Find(KtxApplicationFileName) != KErrNotFound) {
            Ret = ETrue;
            break;
        }

        ph.Close();
    }

    return (Ret == EFalse ? false : true);
I have added -leuser in the pro file and I'm including <e32std.h>. As soon as the console app is started from Qt Creator it immediately exits:
Code:
Nokia_Symbian3_SDK_v0.9\epoc32\release\gcce\urel\MyApp.exe
Starting application...
Application running with pid 856.
C:\sys\bin\MyAppexe exiting with 292 allocated cells, 45 handles
Finished.
I can't even attach a debugger. What could be the issue?