![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Forking with Tclsh vs Wish | pghamami | Shell Programming and Scripting | 3 | 05-06-2008 12:33 PM |
| Testing the forking process. | Vitamin254 | UNIX for Dummies Questions & Answers | 0 | 02-22-2008 07:12 PM |
| VERY confused about forking of child process | JamesByars | UNIX for Advanced & Expert Users | 7 | 02-22-2008 12:31 PM |
| forking process. | kymthasneem | High Level Programming | 2 | 06-23-2007 10:00 AM |
| Forking | manjuWicky | UNIX for Advanced & Expert Users | 3 | 10-07-2005 12:01 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
forking a new process
Hi
I'm currently working with C on UNIX (HPUX) and need to be able to fork a seperate Java process from within a running C process. I can run the following code from the command line via a script but am having difficulty getting it to work from within the code. I am trying to use execl. Is execl the correct command to be using? Any help would be appreciated. Thanks. $JAVAHOME/jre/bin/java -cp \ /opt/mv36/em/SMD/data/jct_005/SMD_LCT.jar:/opt/mv36/em/SMD/data/jct_005/jh.jar:/nms/JamToolsTest/jct/MV36CoreProxyNOP.1.1.jar \ com.marcx.lct.sma11d.sma11d_lct_applet \ -mv36 1 -host 19.3.11.13 -port 20020 \ -inifile /opt/mv36/em/SMD/data/jct_005/ -lang 1 -laf 0 \ -msgset 5 -emaccess 3 -command 221 |
| Forum Sponsor | ||
|
|
|
|||
|
Cheers.
Though could you tell me whether the current environment should be passed to the process run by the execl? The execl is succesfull but the underlying java program doesn't start which is I think because it doesn't receive the DISPLAY variable from the calling code. Is there a way to set this for the child process? Thanks. |
|
||||
|
Check the man page for fork(2).
Quote:
Cheers |