Re: Cant Run Detach Process (384 Views)
Posts: 35
Registered: ‎12-06-2011
Message 1 of 4 (391 Views)

Cant Run Detach Process

Hi there all again. For some reason when i run a process under detached. the process just does not stay in the system.


Below is the file (STARTRDBJDBC.COM) that i created to be sumbit into a detach process.


$ set proc/privi=all
$ define my_classes rdb$jdbc_home
$ set def rdb$jdbc_home
$ spawn/nowait/proc=rdbthinsrv java -jar rdbthinsrv.jar -srv.mcBasePort 0


Here is the file (SUBMIT_JDBC.COM) which submits the file to a detached process.


$ run/detached/authorize/input=STARTRDBJDBC.COM/error=rdbjdbc_error.log -
 /output=rdbjdbc_server.log sys$system:loginout.exe


Also below is the end of log file created by @SUBMIT_JDBC.COM


$ set def rdb$jdbc_home
$ spawn/nowait/proc=rdbthinsrv java -jar rdbthinsrv.jar -srv.mcBasePort 0
%DCL-S-SPAWNED, process RDBTHINSRV spawned
  MBOOKA       job terminated at 13-FEB-2013 11:02:40.56
<CR><LF>  Accounting information:
  Buffered I/O count:                295      Peak working set size:       1888
  Direct I/O count:                   99      Peak virtual size:         171936
  Page faults:                       239      Mounted volumes:                0
  Charged CPU time:        0 00:00:00.11      Elapsed time:       0 00:00:00.36



Request if some1 would advise me how to submit this file so that the process runs as a detach process and not terminate upon completion.     Thanks

Please use plain text.
Posts: 2
Registered: ‎02-12-2013
Message 2 of 4 (384 Views)

Re: Cant Run Detach Process

Why are you spawning rather than running the java command directly?


If you must spawn then you will probably want to remove the /NOWAIT - otherwise the parent process terminates right after spawning off the subprocess and the termination of the parent process also results in the termination of the subprocess. (It does not work the way it would in Unix/Linux.)

Please use plain text.
Honored Contributor
Posts: 3,182
Registered: ‎07-08-2003
Message 3 of 4 (373 Views)

Re: Cant Run Detach Process

I think you would run a daemon process which stay resident.


I look at my sample code where I used run with /UIC option instead of /AUTHORIZE


Here sample code (lowercase must be supplied)



Hope can help you.


Antonio Maria Vigliotti
Please use plain text.
Posts: 16
Registered: ‎08-08-2011
Message 4 of 4 (350 Views)

Re: Cant Run Detach Process



This is what i did setup at a customer and is working fine:


the contents of


$ set verify
$ set noon                                      
$ rename RDB$JDBC_LOGS:'node'_rdbpool.log *.GOL/LOG
$ set on
$ run sys$system:loginout.exe    -
 /detach      -
 /authorize     -
 /output=rdb$jdbc_logs:'node'_rdbpool.log -
 /err=rdb$jdbc_logs:'node'_rdbpool.err    -
 /process_name=rdbpool    -
$ set noverify


and where contains:


$ node = f$getsyi("nodename")
$ set noverify
$ set def rdb$jdbc_home
$ def java$classpath [],rdb$jdbc_home:rdbnative.jar,rdb$jdbc_home:rdbthin.jar,rdb$jdbc_home:rdbthinsrvpool.jar
$ java -jar rdbthinsrvpool.jar -cfg rdb$jdbc_com:'node'_rdb_jdbc.xml -name rdbpool


Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation