migramir
6th April 2006, 00:05
... how to obtain the UNIX PID from a Baan script?

NPRao
6th April 2006, 01:37
Here is a prototype code. You have to generate a shell script with the following command and redirect the output to a temporary file and read that file for the process ids.

[DEV:bsp]/app/common/home/bsp> ps -e | grep bshell | tr -s " " ' ' | cut -f2 -d" "
6770
20821
2118
19315
27313
19688
19322
20673
6767

Alter the process ("bshell") to something you are tracing.

migramir
6th April 2006, 15:59
... I guess I was hoping to find a function that would give me the PID of the current bshell ... :confused:

günther
6th April 2006, 16:04
There is a predefined variable extern long pid which gives you the pid that you see in option dialog when you enter ps.

There is a function extern long bshell.pid() which gives you the (unix) pid of the bshell itself.

Günther

migramir
6th April 2006, 16:11
Thanks!, that's what I was looking for ....