Creating a daemon process with processBuilder

Hello,
This is our problem, we are creating a new process from a java application, with the processBuilder methods. The idea is to launch this process and when the java application is closed the process continues running. But the problem is that when i close the java application, the process die too.
This is the code that we use:
ArrayList commandsList=new ArrayList();
commandsList.add("./test.sh");
Process pfProcessing = new ProcessBuilder(commandsList).start();
In the test.sh script, we launch the program with nohup command and the & to start it in background.
We think that the problem is that when you close the java application, a SIGTERM or SIGINT signal is sent to the process.
If you need more information, do not hesitate to contact us.
Many thanks in advance.

There isn't any way to run a java web start application in "headless" mode (without initializing awt).
All of the javaws error windows, console, download progress window, and security windows are written in swing, and become part of your application, running in the same VM.
/Dietz

Similar Messages

  • How can I create a chain process with rscrm_bapi

    Hello
         We have generated a table, as result of the execution of a query with the transaction rscrm_bapi. It's made manually, and now we want to do it in a chain process so that the table will be generated automatically.
         How can I do this?. Are there any manual? or Anyone know how to do it, step by step?
    Thank you very much.

    Hello,
    managed the execution of rscrm jobs in PC as follows:
    1. Execute query through RSCRM_BAPI transaction
    2. goto sm37 and copy the Jobname (the active one)
    3. Create following progromm
    *& Report /WST/RSCRM_START *
    REPORT /WST/RSCRM_START .
    parameter: l_bid TYPE sysuuid_c.
    CALL METHOD cl_rscrmbw_bapi=>exec_rep_in_batch
    EXPORTING
    i_barepid = l_bid
    4. Execute Programm and fill the Parameter with the Jobname
    5. Save as a new program variant and use in PC as a normal program
    Very strange and I think not very nice that sap uses the jobname to control the execution....but with this workararount it works very nice.
    I hope that helps.
    Regards,

  • How create a complex process with excpetion handling

    i need to modell a complex process which consists of subprocesses
    e.g. a shell command as subprocess
    now i want informations in the audit browser which process component fails at runtime, for example: think that the shell script fails and returns with exit 3
    i have no information in the runtime audit browser that the subprocess failed - it will always displayed as "processed" (without an error)
    so how can i make errors/warnings visible in the execution log of the audit browser

    Hello,
    managed the execution of rscrm jobs in PC as follows:
    1. Execute query through RSCRM_BAPI transaction
    2. goto sm37 and copy the Jobname (the active one)
    3. Create following progromm
    *& Report /WST/RSCRM_START *
    REPORT /WST/RSCRM_START .
    parameter: l_bid TYPE sysuuid_c.
    CALL METHOD cl_rscrmbw_bapi=>exec_rep_in_batch
    EXPORTING
    i_barepid = l_bid
    4. Execute Programm and fill the Parameter with the Jobname
    5. Save as a new program variant and use in PC as a normal program
    Very strange and I think not very nice that sap uses the jobname to control the execution....but with this workararount it works very nice.
    I hope that helps.
    Regards,

  • Create a CR for multiple processing with me as the current processor

    Hi
    How to create a change request for multiple processing with myself as the current processor.
    I have created a change request for multiple processing and the ystem throws me the error that "There are no suitable change requests"
    Display help shows the below
    For the upload you need a change request that has the status Considered
    and Approved or To Be Revised and ideally has a type that does
    not have the property Object List Is Binding. If the
    change request does have this property, all the entities that are uploaded must
    already be assigned to this object list.
    Please can someoen guide me on how to fix this.
    I found few threads related to this but cudint understand on how to assign a status to CR
    Thanks,
    Sharma

    Hi Prateek,
    Please can anyone give any pointers on how to set the status of change request (for multiple processing):-
    For assigning the statuses to the change request:-
    Go to t code:- MDGIMG->General settings>Process Modeling>Change Request>Edit status of change request.
    the path you mentioned is to create and edit the existing Change request statuses, what I am looking for is when I create a CR for Multi record processing and try to upload a file I get the error "There are no suitable change requests". and when I check the Status of the change request I created I see that the status is Changes to be executed (Set automatically).
    how can i set myself as the processor.
    tcode: MDGIMG->General settings>Process Modeling>Change Request>Create Change request type. Ucheck the single object checkbox and assign your userid for that CR step.
    Single object is already Unchecked  and I am using BRF+ so when I am the processor First approver is say X, I am not sure if we have any place where we can set ourselves as the user. Please let me know if I missed sumting
    Thanks
    Hi Shephalika,
    Yes I am trying to upload a file and Single object is Unchecked in the Change request type.
    Thanks,
    Sharma

  • Help: Problems with executing a daemon process on Solaris

    Hi,
    We have a script that starts a daemon process that listens for network connections.
    If I run the script from command line it works OK. The problem occurs when we
    start the script from a scheduler.
    The scheduler we use is OPC, a mainframe based scheduler which has a process
    running on the solaris box. That process invokes a program (runtool) which finally
    invokes my script. runtool is a simple program that does setuid etc so that
    when my script gets run by OPC the effective user is me.
    I am not able to figure out why it works ok from the command line and doesn't work
    when invoked through a setuid framework.
    Any suggestions on how I go about debugging this?
    Thanks!
    Manojith
    [email protected]
    Here is the info from uname -a:
    SunOS <hostname> Generic_106541-15 sun4u sparc SUNW,Ultra-80

    $ oerr ora 9925
    09925, 00000,  "Unable to create audit trail file"
    // *Cause:  ORACLE was not able to create the file being used to hold
    //          audit trail records.
    // *Action: Check the UNIX error number for a possible operating system error.
    //          If there is no error, contact ORACLE customer support.
    $                                   write permission problem or non-existent directory ?

  • [SOLVED] dhcpcd exits with no daemon process ... but still works

    This is in the newbie corner as I'm baffled by this and not even well enough informed to know where to gather information.
    Very recently the behavior of dhcpcd changed.  Previously, it would daemonize and remain in the background: it would show up in pstree and pgrep output.  Now, it still works perfectly, but after it runs, it seems to fully exit without leaving a daemon process - or at least not one that shows up in pstree or pgrep output.
    There is no actual problem here, but I'd like to learn about this change if anyone can enlighten me.
    Last edited by Trilby (2015-04-25 16:21:29)

    I do not (intentionally) use systemd-networkd, and it is not running.
    $ pacman -Q dhcpcd
    dhcpcd 6.8.1-1
    $ systemctl status dhcpcd
    ● dhcpcd.service - dhcpcd on all interfaces
    Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; disabled; vendor preset: disabled)
    Active: inactive (dead)
    I don't use the dhcpcd service - I just envoke it manually.  I'll double check in a moment, but I don't believe I have a connection until I run dhcpcd on my wireless interface (after wpa_supplicant).
    So it seems I do need to explicitly run dhcpcd, but I can kill it after it connects, and my connection remains:
    # no connection and no active services at start
    $ sudo wpa_supplicant -B -i wls1 -c /usr/share/swifer/NETGEAR10
    Successfully initialized wpa_supplicant
    $ pgrep dhcpcd
    $ ping google.com
    ping: unknown host google.com
    $ sudo dhcpcd wls1
    DUID 00:01:00:01:1a:3c:f0:eb:00:26:c6:c9:40:0c
    wls1: IAID 6a:76:c9:30
    wls1: soliciting an IPv6 router
    wls1: rebinding lease of 192.168.1.76
    wls1: leased 192.168.1.76 for 86400 seconds
    wls1: changing route to 192.168.1.0/24
    wls1: changing default route via 192.168.1.1
    forked to background, child pid 806
    $ ping google.com
    PING google.com (74.125.21.101) 56(84) bytes of data.
    64 bytes from yv-in-f101.1e100.net (74.125.21.101): icmp_seq=1 ttl=36 time=46.3 ms
    ^C
    --- google.com ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 46.315/46.315/46.315/0.000 ms
    $ pgrep dhcpcd
    806
    $ sudo killall dhcpcd
    $ pgrep dhcpcd
    $ ping google.com
    PING google.com (74.125.21.101) 56(84) bytes of data.
    64 bytes from yv-in-f101.1e100.net (74.125.21.101): icmp_seq=1 ttl=36 time=128 ms
    64 bytes from yv-in-f101.1e100.net (74.125.21.101): icmp_seq=2 ttl=36 time=100 ms
    64 bytes from yv-in-f101.1e100.net (74.125.21.101): icmp_seq=3 ttl=36 time=53.0 ms
    64 bytes from yv-in-f101.1e100.net (74.125.21.101): icmp_seq=4 ttl=36 time=47.0 ms
    q64 bytes from yv-in-f101.1e100.net (74.125.21.101): icmp_seq=5 ttl=36 time=48.3 ms
    ^C
    --- google.com ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4007ms
    rtt min/avg/max/mdev = 47.073/75.519/128.444/33.126 ms
    While this time it seems I had to kill dhcpcd myself.  But just the same, it is no longer running, yet my connection stays up.

  • How to create an independent process in java

    Hi ,
    I want to execute a dos command from a java program.
    The code is shown below.
    Process p;
    ProcessBuilder pb;
    command[0] = "cmd";
              command[1] = "/C";
              command[2] = "C:\\plink.exe -v -N -L 33890:10.103.1.87:3389 -l graja 10.100.32.100 -i C:\\putty_private.ppk -pw xxxxx \n";
            pb = new ProcessBuilder(command);
            p = pb.start();The purpose of this program is create an ssh tunnel to the specified host .i.e 10.100.32.100 (here).
    The problem i am facing here is, the tunnel is not created until the main program which creates this process is exited.
    My requirement is ..the main program and the process should be run at the same time.
    *plink is the command line version of PuTTY tool.
    * I tried this with one level threading and two level threading also. but it couldnt workout.
    Hi,
    This looks to be very small.
    I wish to create a process which executes a DOS command ( It is one which deals with network connections).
    I have written a small program, which creates a process that executes the DOS command.
    Until the main thread or process is exited , the connection is not establishing..
    In my project , the main() thread should create a process and continue with remaining program.
    For this , i have tried with 2 levels of threading , but i couldn't get through.
    This is the code of main program:
    public class abc {
    public static void main(String[] args){
    String[] command =  new String[3];
            command[0] = "cmd";
            command[1] = "/C";
            command[2] = "C:\\plink.exe -v -N -L 33890:10.103.1.87:3389 -l graja 10.100.32.100 -i C:\\putty_private.ppk ";
    Process       p = Runtime.getRuntime().exec(command);     
    }First , i tried with putting this code in the main function itself.
    Second, i tried with putting this code in a thread(), which is created and started by main() function ---one level threading. like the below...
    public class  hello extends Thread
        public Process p ;
        public void run()
            try{
            String[] command =  new String[3];
            command[0] = "cmd";
            command[1] = "/C";
            command[2] = "C:\\plink.exe -v -N -L 33890:10.103.1.87:3389 -l graja 10.100.32.100 -i C:\\putty_private.ppk ";
            p = Runtime.getRuntime().exec(command);      
            }catch(Exception e)
                e.printStackTrace();
       public static void main(String[] args) throws Exception
           hello h = new hello();
           h.start();
           Third , i tried with putting this code in a thread which creates another thread which creates this process.
    But problem was not solved
    Can anybody please help me in this?
    Thanks,
    Raj
    Edited by: raj143shi on May 26, 2008 11:39 PM

    Need not to use thread for this.
    Once you execute the command..job is done at that time only.
    Check the example below
    1. While the main thread is sleeping your output file (a.txt) is created in C:\
    import java.io.IOException;
    public class abc1 {
        public static void main(String[] args){
        String[] command =  new String[3];
                command[0] = "cmd";
                command[1] = "/C";
                command[2] = "DIR >> c:\\a.txt";
                try {
                 Process p = Runtime.getRuntime().exec(command);
        } catch (IOException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
        try {
         Thread.sleep(50000);
         System.out.println("Slept for 50 secs");
        } catch (InterruptedException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
    }

  • How to profile the TimesTen Daemon process?

    Hi:
    I want to profile the CPU usage of Timesten server process and his child process by using a profile tool named psrun. I use the following command to do this work.
    psrun -f ttDaemonAdmin -start
    here , psrun is a utility to collect the CPU usage of an executeble programe, the parameter "-f" can help to monitor the child process. In fact, psrun will create a thread (say, t1) to execute ttDaemonAdmin.exe. but as we know the ttDaemonAdmin will actually to execute the "ttDaemontAdminCmd -start" to produce the "TimesTen Damon" process. this process is a real type of daemon process. So once the "TimesTen Daemon" process is created successfully, t1 will dead right now, then psrun will finish the collect work, because it is waiting for the signal from t1.So, I could not do the profile work actually.
    My question is how to resolve this problem, is there any other method can help me do this work?
    Best regards

    Hi,
    Simply go to the "Run" menu in flex builder.There you will find "Profile" at third number in the MinuList click it,you will redirected to the Pofiler in flex builder.
    with Regards,
    Shardul Singh Bartwal

  • Create new smtp process

    hello, on solaris 8 and Netscape Messaging Server 4.15SP7
    how to create and configure news smtp process. I have
    one on IP/Port on hme0 and I have a second ethernet
    interface hme1. I try to create a smtp process on IP/Port on hme1.
    Must I install news server (with pop, imap, ..) or
    there is another solution.
    (I must use NMS4)
    Thank you A+

    I'm not sure but a configutil parameter of service.listenaddr (or something close to that) exists in iMS that the POP/HTTP/IMAP daemons use for configuration information. I'm guessing that NMS SMTP does the same thing. By default they listen on all available addresses/interfaces.
    -Chad-

  • Cannot do MIGO in Third Party Sales Process with shipping notification

    In the Third party sales process with Shipping notification,the item category for the material is TAS (Billing relevance=R),item category group is BANS.
    Intially sales order is created,then using me21n with reference to purchase requisation purchase order is created,then in MIGO stage i used the PO No there but i get the message no item found in PO.
    what adjustment have to be done in order to do MIGO

    Refer following SDN thread, by that you will be able to get overview on best practices about Third Party Sales & necessary configuration you need to follow for statistical GR:
    - Third party direct shipment (II)
    Further maintain Billing Relevance for Item Category as G - Order-related billing of the delivery quantity.
    Regards
    JP

  • Third party process with Valuated sales order stock

    Hi All,
    We have third party sales order process with valuated sales order stock. The problem is that in the theird party PR which is triggered directly from the sales order it determines a stock account which is assigned to the BSX key in OBYC.
    But since this is third party processing as per my understanding a consumption account assigned to key GBB-VAX (since account assignmnt category is X) should get determined, so that when the GR is done against the PO a consumption posting is done in the background.
    I am not able to understand if the system is determining the stock account due to the fact that it is valuated sales order stock and if so, what should happen after GR. Should we have a stock created for the material which is physically directly delivered to the customer?
    Regards,
    V S

    Hi,
    Check GBB-VKA which is defined in OME9 for your ''E'' Account Assignment Category that SAP will debit upon GR posting
    Also check "X" GBB-VAX and the G/L account assignment in OBYC
    The posting on GR should be debit KBS -Credit GR-IR
    Thanks
    Diwakar

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

  • Images chopped off when creating a mobi file with kindlegen from inDesign epub

    I'm having difficulty with a reflowable ebook project which includes line drawing illustrations. They are mainly looking good all sized at 600px wide (all greyscale gifs under 127k) and exporting with object export options set to CSS: relative to text flow. Where they fall in the middle of text on a page they look great, most are landscape format, wider than they are tall. However once they are exported if they fall near the bottom of the page they just disappear off the page, in some cases you just catch a tiny glimpse of the top and the rest has gone, it does not appear on the following page. I've tried a variety of export combinations include page breaks before, after and before and after and it's just not making a difference.
    I'm using Indesign CC (2014) on a mac and then opening with Kindle previewer and letting kindlegen convert to a .mobi. If I open the epub with digital editions the same thing is occurring. It is an mobi file I need at the end of the process. It seems to happen whatever device I use to emulate the preview on The Kindle previewer and illustrations may appear whole in one view then disappear on another, depending on how it's reflowing. I've also sent it to my kindle and it's definitely chopping the images off on that.
    Is there anyway I can ensure the whole image is displayed, I thought adding a page break before would do it but this doesn't seem to be working I'd even live with the nasty gaps that would give me. I've applied paragraph styles, object styles and looked at the export options, wondering if I've got in a mess here somehow - what takes priority?
    I'd like to do this in inDesign, I have looked at the code in sigil and can only tell that the images are consistently coded, not sure how they should read.
    Any help with this would be great as I'm going round and round now!

    Hi Monica
    Thanks for your reply it made me focus on the export options and stop messing with styles. I decided it was time to start again, so I created a new document with the intent set to digital publishing (I've not bothered with this previously and it's not seemed to matter) and copied across the contents of the book I only had to recreate a TOC everything else styles wise copied across fine and I re-imported the meta-data then tried epub export again, in Object settings I selected use original image and selected relative to text flow, and it's working! I wonder if something has changed in InDesign CC 2014 because I never used a digital publishing intent document before as I thought the page setup had no bearing on the epub export..? (This was exactly the same export settings I had tried with my original document which was derived from a print version) Anyway I have a solution, I'm not needing to use the page breaks as the images are being put as I wanted in the text flow if they fit, on the next page if not, which is fine. Now if I could just sort the space before in paragraph styles when it's the first item in a text box, so that a dedication could sit in the middle of the page... but I guess that's another question!

  • When I restart my computer and hold the option key after creating a bootable usb with windows 7 and partitioning only the original partition shows up. Not the windows one or the bootable usb.

         Okay so first things first this isn't the newest macbook pro. When I open about my mac and go to system report it says it is a Macbook Pro 3,1 and the Boot Rom Version say MBP31.0070.B07. Originally when starting up Boot Camp Assistant there where only two options, the "create windows 7 bootable usb" was not there at all. So after some editing and helpful tutorials I was able to get the option show up and created a bootable usb with windows 7 and downloaded the support software onto a separate flash drive. Finally I did the last step and created a second partition for windows. Once the process is complete my computer automatically restarts.
         This is where the problem is. Once my computer makes the booting up sound it doesn't load up windows it gets stuck on a apple logo as if it's trying to reastart normally and can't. So I shut down and this time I hold down the option key during start up. It brings up the main partition and some recovery thing but no windows partiton and no bootable usb.
         I forgot to mention that I am running OS X 10.9.3. Okay any body want to help me out? Iv'e been at this for hours and can't get an inch closer to having windows. Please and thank you!
    P.S. If I missed a discussion that answer my question just point me to it. Iv'e been looking for a while, but who knows i might have missed one.

    The only known way to make it work on an external drive is by first installing Windows onto an internal drive, then cloning the install to an external Thunderbolt drive. Thunderbolt is seen as an extension of the internal bus, so Windows doesn't see it as an external device.

  • Create a Sales Order with Reference to Contract using IDoc / LSMW  ( AFS )

    Hi Gurus,
    I need to crate a Sales Order with reference to a Contract. I need to upload Sales Orders with reference to contract via LSMW.
    So far, I've been able to create the Sales Order with ref to contract. But, the Sales Order Quantity is not getting deducted from the Original Qty in Referred Contract ( When try to create another Sales Order referring to the same Contract.) When a Sales Order is created manually, this is working fine.
    Please tell me if I've missed some parameter which stopping it create the link to exact schedule line ( Sizes level )
    The Details of the IDoc which is been created via LSMW are as follows;
    Message Type: ORDERS
    Basic Type     : /AFS/ORDERS05
    Process Code : ORDE / DELO
    ( Tried with both process codes.  But the Identification is the same for both: IDOC_INPUT_ORDERS )
    *_In Header;_
    Segment : E1EDK02  - IDoc: Document header reference data *
    Qualifier : '043' - Vendor Contract Number ( Tried with ' 005' - Customer Contract, but it's not working )
    Contract Order is mapped for field BELNR
    *_In Item;_
    Segment : E1EDP02  - IDoc: Document Item Reference Data *
    Qualifier : '043' - Vendor Contract Number ( Tried with ' 005' - Customer Contract, but it's not working )
    Contract Order is mapped to field BELNR
    Line Item of the Contract is mapped to field ZEILE
    I also tried passing the Schedule line of Contract in Segment :  E1J3P01 AFS IDoc: Doc.item general data
    to following fields;
    J_3AETENV
    J_3AVGETE
    /AFS/UETENR
    Still its not getting updated in the VBEP also..
    Please help me with regard to this. Points will be awarded for your valuable contribution.
    Thanks.

    Hi,
    This issue is been resolved.
    One of my friend helped me with resolving this issue..
    Once the below mentioned configurations were done on SPRO, the Sales Order was created with reference to Contract and the Qty was reflected when tried to create a new Order referring the same contract.;
    u2022     SPRO --> SD  -->Sales  --> Sales Documents  --> Sales Document Header  --> Define Sales Document Types  --> Field : Outline agreement message; from blank to u201CBu201D.
    u2022     SPRO  -->SD  -->Sales  --> Sales Documents  --> Sales Document Header  --> Maintain Sales Document Types for AFS  --> Field : Outline agreement message; from blank to u201CAu201D

Maybe you are looking for

  • Safari 7 in 10.9, .gifs are broken.

    Hi all. I'm running a late 2009 15" MBP, upgraded to Mavericks awhile ago. One thing I've noticed is that animated .gifs will only play through once, then they stop. If some input is active over the browser window (such as moving the cursor or typing

  • Can 5 axis image stabilization be engaged with non system lenses for A7II and A7rII?

    Many people use/will use their excellent non system manual focus non system macro lenses on the A7II and undoubtedly on the soon to be released A7RII. Stabilization in the X/Y planes is very very important for macro. Sony on the A7II only stablizes t

  • All I need is Photoshop & Adobe Acrobat- What do I download?

    I'm a Marketing Rep at a Doctor's@ office and all I really need is Photoshop and Adobe Acrobat.  But I'm not sure what to download.  Do I download Adobe Pro or Adobe Standard?  Then there is the Creative Cloud--I really only need Photoshop.  Can I on

  • More no of coulmns matters on performance?

    Dear Members, We have a table of Vehicle master, we have nearly 50 attributes to define for each vehicle, which could be the better best to define all 50 columns in a single table or having multiple tables like given ex. below. 1) veh_master veh_id P

  • ZSEGREPORT Not Exists in ECC System

    Hi Guys, I am trying to access SAP tables, Clusters and FM using Crystal report. I am getting below error message "you do not have the necessary rights to design reports against the SAP system" I checked all our post in SDN, We successfully transport