LINUX PID

Posted by lace28 on 26-Oct-2007 09:40

Hi,

I have a program running in batch-mode on a Linux OS and I'm trying to get the PID my program is using from within the program itself. any ideas?

Thank you.

Olivier.

All Replies

Posted by kevin_saunders on 29-Oct-2007 03:55

Use VSTs to find the information..

DEF VAR iPID AS INT No-UNDO.

FIND _MyConnection NO-LOCK.

ASSIGN iPID = MyConnection.MyConn-Pid.

Posted by rstanciu on 29-Oct-2007 06:17

DEFINE VARIABLE ppid AS CHAR NO-UNDO.

INPUT THROUGH "echo $PPID".

IMPORT ppid.

INPUT CLOSE.

MESSAGE ppid.

Posted by lace28 on 12-Dec-2007 09:18

You were both right, thank you very much this helps me a lot. I tried to mark both messages as correct but I couldn't. Sorry about that.

Olivier.

This thread is closed