Closing Terminal Kills nohup Applications

Hi! I have been trying to get a background job to survive a quit of Terminal.app but have had no luck figuring it out. I start my job as follows (from a Terminal window):
nohup myscript.sh &
I bring up Activity monitor and I can see the pid I started and can confirm it is running in the background. However, when I Quit Terminal.app, that process is killed along with it.
Is there something else that I need to do to make my app survive the Terminal.app scope? Thank you in advance for any info.

For further queries, I suggest posting to the Unix forum under OS X Technologies where the Unix and Terminal gurus hang out.

Similar Messages

  • Killing an application running on RT

    Hi
    Am using an PXI -8186 embedded controller with PharLap ETS RTOS, i have downloaded an application on to the RT startup directory. I want to deleted the application as i dont need it, but as it automatically starts running when pxi boots up i am unable to delete it. How can i Kill the application and delete it from startup? The rtos does not have a promt, so i can kill the task or look in to directory.
    I have to use only Ftp. can any one please help.
    thanx
    Arun

    Hello!
    On your 8186 there is a disable start up VI switch. On page 2-12 of the manual you will be able to find the location of this switch. Just incase I have pasted the link to the manual below.
    http://www.ni.com/pdf/manuals/370747c.pdf
    After you disable the start VI you will be able to remove it. Hope this helps. Let me know if I can give you anymore assistance.
    Allan S.
    National Instruments

  • Lately, I've been getting a blue screen in the midst of working and have to do a cold reboot to end it. Seems to happen when I'm closing windows or quitting applications. Not always, but sporadically. What causes this? I'm using 10.6.8 on early 2011 MBP.

    Lately, I've been getting a blue screen in the midst of working and have to do a cold reboot to end it. Seems to happen when I'm closing windows or quitting applications. Not always, but sporadically. What causes this? I'm using 10.6.8 on early 2011 MBP. Thanks for any help/advice!

    You have 10.6 on that machine, I suggest you stick with it for performance, third party hardware and software reasons as long as possible.
    Consider 10.8 (not 10.7) when it's released, because 10.7 and 10.8 will require a new investment in software and newer third party hardware as it requires newer drivers the old machines won't have. (forced upgrade because of software, really nice of them)
    http://roaringapps.com/apps:table
    Far as your Safari problem do these things until it's resolved:
    1: Software Update fully under the Apple menu.
    2: Check the status of your plug-ins and update (works for all browsers) also install Firefox and see if your problems continue. You should always have at least two browsers on the machine just in case one fails.
    https://www.mozilla.org/en-US/plugincheck/
    Flash install instructions/problem resolution here if you need it.
    How to install Flash, fix problems
    3: Install Safari again from Apple's web site
    https://www.apple.com/safari/
    4: Run through this list of fixes, stopping with #16 and report back before doing #17
    Step by Step to fix your Mac

  • Kill viewer-application

    Hello,
    Can anybody tell me the syntax to kill a windows application (an application to view archived documents) in an ABAP program. The class CL_GUI_FRONTEND_SERVICES has only a method to execute an application, but not to stop it.
    Probably it will run with function module SXPG_COMMAND_EXECUTE, but I don't know the command to kill the application with DOS. The command NET STOP <servicename> wasn't successful yet.
    How it can be done, and where can I get some information on it?
    Best Regards,
    Dominik

    Please do not open multiple threads for the same question.  THanks.
    Regards,
    Rich Heilman

  • Still no ways to kill fullscreen applications?

    I'm not sure if I'm getting this wrong. But it seems like at 10.6, Apple still didn't release control to the users. When a fullscreen application freezes (nothing else, just the application), there is still no ways to kill the application. +Q doesn't work, OptEsc doesn't work, +Tab doesn't work.
    In linux I can switch to another tty and in Windows, Alt-Tab typically still works in applications, as do Ctrl-Alt-Delete. Under the hood, mac does have one of the best OS around but why doesn't Apple allow users control their own OS yet?
    Having to force shutdown a computer just because one application crashed (I can still control brightness etc) is ridiculous. Telling me to ssh into my own computer while I should still have control of it is even more ridiculous

    I'm not sure if I'm getting this wrong. But it seems like at 10.6, Apple still didn't release control to the users.
    You're getting it wrong. See below.
    When a fullscreen application freezes (nothing else, just the application), there is still no ways to kill the application. +Q doesn't work, OptEsc doesn't work, +Tab doesn't work.
    If the force quit keys don't work, then you need to be blaming the maker of the fullscreen application, not Apple. If the app doesn't let you use the standard command-Q keystroke, again, blame the maker of the app. If it doesn't let you switch to other apps through standard methods like command-tab... yeah, you know what I'm going to say.
    Apple provides a very good set of tools. If an app uses skanky methods to disable things that shouldn't be disabled or doesn't provide support for standard keystrokes (like command-Q), that is not Apple's doing.
    Fact is, I've never had trouble with command-option-escape to force quit a fullscreen app. That always works fine for me. It's not uncommon for fullscreen apps to prevent switching via command-tab, and it's also not uncommon for some fullscreen games to not support command-Q.
    Under the hood, mac does have one of the best OS around but why doesn't Apple allow users control their own OS yet?
    Let me get this straight... you are choosing to run a fullscreen application that restricts what you are allowed to do, and you are complaining that Apple is not allowing you to control your OS? That's a joke...

  • How to kill a application

    Hi All
    How can I kill an application on Windows box using Java.
    Right now I use Task Manager and kill the application using End Task. I want to be able to do this from my Java program.
    Please let me know.
    Thanks
    Modha/-

    with great difficulty. so much so that it's almost certainly not worth the bother. it can't be done at all using just java, you need native code, and if you're going to go to that bother you may as well write the whole thing in native code

  • Closing all JFrames without killing the application

    Is there a way I can close all JFrames without quiting the application? I have several JFrames open that I want to dispose of at the same time. Is this possible?

    If you close all the JFrames, then how does the user
    interact with the application?I think that's outside the scope of the original question, but there are a number of possibilities. To name just a few:
    1) The console
    2) The program opens a new JFrame after some time has elapsed (maybe an appointment reminder application, or an instant messenger client, for example)
    3) The program is really a server, so you don't need to see anything
    4) The program is "spyware" so it's meant to be hidden
    5) The program runs in full-screen mode part of the time (for example, a game which uses JFrames to choose options, then full-screen for game play)
    ...

  • Closing ssh kills java daemon

    I have a relatively simple java daemon that displays an authentication dialog as a Jframe at startup but then has no further need of anything GUI related. The problem is that if I launch the app on a remote machine via ssh and then close the ssh session, the app quits. If I remove the dialog (hence no GUI whatsoever), closing the ssh session does not cause the app to die. Does anyone have any ideas about how I could sever the X dependancy after the dialog has been displayed? References to 'headless' seem to indicate that you can launch an app that way but you can't make a running app headless.
    The app is launched with the following command in a script:
    nohup java -cp $CLASSPATH <classname>  &When the app quits, the following output is placed in nohup.out:
    X connection to localhost:10.0 host broken (explicit kill or server shutdown)- Thanks

    I'm stuck with the same problem. I use a frame in the startup of my application and the it is supposed to be left to run as a daemon, but when I close the SSH session, the app crashes with the same error:
    X connection to localhost:10.0 host broken (explicit kill or server shutdown)
    I isolated the problem with a small program:
    import java.awt.FlowLayout;
    import java.io.IOException;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    public class T {
            public static String readPassphrase(String prompt)
                            throws IOException {
                    JPasswordField pwd = new JPasswordField(10);
                    JPanel panel = new JPanel(new FlowLayout());
                    panel.add(new JLabel(prompt));
                    panel.add(pwd);
                    JOptionPane.showConfirmDialog(null, panel, "Passphrase",
                                    JOptionPane.OK_CANCEL_OPTION);
                    return new String(pwd.getPassword());
            public static void main(String[] args) throws Exception {
                    readPassphrase("Type in your password:");
                    while(true) {
                            System.out.println("Sleeping for five seconds.");
                            Thread.sleep(5000);
    }Ssh to a remote machine and launch this program with
    nohup java T &
    After providing the password, exit your SSH session (it will probably exit only after a Ctrl+C since it waits for the X connection to finish). Now when you SSH again to that machine to see if your daemon is running, you won't see it. At the end of the nohup.out, you'll see the ugly "explicit kill" message.
    After this example, we can say that there is an open X connection being tunnelled throught the SSH session. So two questions:
    1) Why does my Java process crash when this connection is broken?
    2) How can I prevent this behavior? Maybe a way to close the x connection in my program, or make it not abort after a connection closure.
    Thanks!
    Joao.

  • Need to create report query to get latest open and last closed period for given application

    Hi All,
    I need to create a report query to get below result displayed in report output.
    1)   -   Application name
    2)   -    Ledger name
    -o/  -Operating Unit
    3)   -  Last Closed Period
    4)   -  Current Open Period
    5)   -  Date Closed – Last Closed Period
    6)   -  Date Open – Current Open Period
    I tr I tried to create the query below is the same. Please let me know if it looks fine.
    SELECT *
      FROM (SELECT fav.application_name ,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status ='C'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc )WHERE ROWNUM = 1 
    UNION ALL
    SELECT *
      FROM (SELECT fav.application_name Application_Name,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status = 'O'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc)
             WHERE ROWNUM = 1

    It is within the table I believe (I'm not a DBA or a developer) since I created a BLOB column and then used the file browse feature to allow users to attach a resume to the table in order to be able to perform a search of the attached documents.
    I'm just having a hard time pointing the link in the search results report to the document in the blob column.
    The information on that page is great if you're trying to create a link to the document on the initial report.
    But I created a query using Oracle Text to run a report that does a boolean search of the attached word documents in the table.
    When it displays the search results, it doesn't create a link to the document and I can't figure out how to do it.
    Here's a link the the instructions I used to create the initial search report with Oracle Text, mind you I only created the index and query, I didn't add in all the link data since they're using documents on websites and I'm using documents in a table.
    http://www.oracle.com/technology/products/database/application_express/pdf/apex_text_application_v1.6.pdf
    If you can help me with this I'd really appreciate it.
    Thanks again.
    Greg
    Edited by: gjones77 on Dec 2, 2008 8:14 AM

  • Should EntityManaer be Closed in a Desktop Application Environment

    Hi All,
    I'm developing a desktop application with persistence api to connection to database. The application consists of two simple classes Order and Customer, where Customer is used as a field in Order. There is a ManyToOne relationship from Order to Customer and a OneToMany relationship from Customer to Order.
    I have another class DBManager for managing all the database activities. All the methods in the class will create an entityManager and close the entityManager once they finish their own operation. An example method is as following:
    public void addOrder(Order order) throws Exception
            try {
                entityManager = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT).createEntityManager();
                entityManager.getTransaction().begin();           
                entityManager.persist(order);
                entityManager.getTransaction().commit();
            } finally {
                if (entityManager.isOpen())
                    entityManager.close();
        }As all entity instances will become detached once the entity manager is close. If I execute the above method, I'll receive an error saying that "Cannot persist detached object.", where the object refers to the Customer object stored in the Order.
    I found that there are two ways to fix this problem, I can either merge the Customer object back to the context as following:
    public void addOrder(Order order) throws Exception
            try {
                entityManager = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT).createEntityManager();
                entityManager.getTransaction().begin();
                order.setCustomer(entityManager.merge(order.getCustomer()));
                entityManager.persist(order);
                entityManager.getTransaction().commit();
            } finally {
                if (entityManager.isOpen())
                    entityManager.close();
        }or I can leave the entityManager unclosed after any operation as following:
    public void addOrder(Order order) throws Exception
                entityManager = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT).createEntityManager();
                entityManager.getTransaction().begin();           
                entityManager.persist(order);
                entityManager.getTransaction().commit();
        }Both ways would work but I'm not sure which one is the best practice to handle the situation. I know that in EJB environment the entityManager should never be closed, but according to article http://java.sun.com/developer/technicalArticles/J2SE/Desktop/persistenceapi/, entityManager should always be closed when it is no longer needed. I'm therefore very confused about which way to go. Can anyone please give me some advice on that?
    Thanks in advance. You help would be greatly appreciated.
    Edited by: EWL on Feb 18, 2008 4:37 PM

    There are a couple of combining usage issues that are providing the problem. The issue is not specifically with you closing the EM but that combined with your usage of the persist() api. This test case would have the same issue in an EJB environment even if you were not closing the EM.
    When using the persist() api you are depending on the behaviour that managed objects are ignored by the persist when infact you should be using multiple APIs depending on the state of the Entities that your application is interacting with.
    The best approach is to interact with the EM within your application code. This allows you to share the same EM across all of a particular business call or logical application transaction. This could be wrapped within a DBManager but you would need to expose the concept of transactions to the application. This ensures you can track the lifecycle state of the Entities involved while allowing you to easily manage the EM resource.
    If your architecture requires the DBManager pattern you have developed then you should only use persist() on Entities that you know to be new and merge() otherwise. In the example you have provided you could simply swap out persist() for merge() in your addOrder method (without the additional customer merge) and the code should work as you expect allowing you to close the EM.
    You will need to close() or clear() the EM at some point within your application. Otherwise you are sure to run out of memory.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to stop webdynpro runtime killing previous application resources

    Hi
    I gone through the how to guide http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/91b6ad90-0201-0010-efa3-9626d2685b6e
    I have similar requirement where two applications existing in different projects(same).
    I have a requirement where source application need to send some parameters to the target application.This can be performed using the above tutorial approach,but the issue is when the target application closed, the source application automatically expiring.
    Any help on this issue issue.. i need a interaction between source and targed and vice versa.
    Thanks
    Prasad

    Hi
    I gone through the how to guide http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/91b6ad90-0201-0010-efa3-9626d2685b6e
    I have similar requirement where two applications existing in different projects(same).
    I have a requirement where source application need to send some parameters to the target application.This can be performed using the above tutorial approach,but the issue is when the target application closed, the source application automatically expiring.
    Any help on this issue issue.. i need a interaction between source and targed and vice versa.
    Thanks
    Prasad

  • Terminating the webdynrpro application

    hi
    WDClientUser.forceLogoffClientUser(null) 
      i have  a close button which  has to close the
      whole  application , i have used the above application 
        but  it will call the default  SAP logoff.htm
           and  ia ma getting  a  message in  the
          next page  as
            WEBDYNPRO APPLICATION TERMINATED. 
                    THANK YOU.
         now i dont want this  ,  instead of this message  i want
      my own message .

    hhh

  • Seeking partner for next killer Flex application

    Ok, so I've been writing, designing and developing this
    killer web 2.0 application that is sure to be a HUGE hit. It's a
    bit more than i can handle on my own so I'm looking to partner up
    with someone who is extremely talented (and without an attitude)
    and has some business sense or a desire for financial independance.
    Technically I'm looking for a Flex developer who has some .NET
    2.0/SQL experience. Me - I'm a seasoned freelance interactive
    designer and developer who specializes in user experience and
    graphic design.
    For serious inquiries please email me at [email protected]
    - Andrew

    Instead of manipulating the application, why not wrap all your content inside a container with scroll bars? You can then magnify the content and scroll it.
    I'd give it a go, but I have loads of other things to do and I can't help wondering if the browser is better at magnifying content.

  • How to save terminal command as application

    Does anybody know how to save this terminal command as an application? This is the command that I use to backup my computer, but it is annoying having to copy and paste it into terminal every time I want to use it. Here is the command:
    sudo rsync -auE --progress / /Volumes/Backup
    If I Paste this into terminal, it asks me for my password, then starts backing up. When I enter it into automator or applescript editor, there is an error. Thanks in advance!

    I tried saving a shell script command in an Applescript but when I run the script, it runs but then I get a spinning wheel, as if the script is in an endless loop. Can someone clarify what I need to do?
    My script:
    do shell script "/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder & disown"

  • No terminal.app in Applications/Utilities/

    I do not have terminal.app in my Applications/Utilities directory and am wondering how I would go about downloading or getting it off the DVD's? I have the X11 just now terminal.
    Cheers
    Ali

    first make sure that it's really gone and did not become invisible or was accidentally moved.
    do a spotlight search for "Terminal".
    also paste the following into an xterm window
    ls -ladeO /Applications/Utilities/terminal.app
    If it lists the permissions with a hidden flag the app became invisible. if it returns an error the app is really gone. then use [Pacifist|http://www.versiontracker.com/dyn/moreinfo/macosx/12743] to pull it off the leopard install DVD.

Maybe you are looking for

  • Mail Problems before and after 10.4.6

    On Friday, running under 10.4.5, Mail started acting strangely (it would have the gray wheel around my main accounts -- from two different servers). I would have to force quit. At the same time, address book stopped opening (it would require a force

  • Camera Raw 5.4 beta plug-in error with Hasselblad H3D-39

    Whenever I open a .3FR file taken with my Hasselblad H3D-39 in Adobe Camera Raw 5.4 Beta I get "Error. Unable to read the ful size image. There was an unknown error" and a white exclamation mark inside a red octagon shows at the top right corner of t

  • How do I convert a document created in Pages to a pdf file?

    How do I convert a document created in Pages to a pdf file?

  • Inconvenience and gaps in the new "Music" app. (iOS 5.1.1)

    Is there anyone else who is unhappy with the changes in iOS 5.1.1? I am very disappointed how to use the "Music" app. in iOS 5.1.1 after the interface has changed. In the new interface we have NOT: 1    Left-side navigation panel 2    "List" view for

  • Using ALEAUD for application reply? or build a new IDOC ?

    Hello. I have a scenario where a 3rd party sends me a message, that I map in my PI to an ACC_DOCUMENT IDOC. I need to send a reply on the ACC_DOCUMENT IDOC after processing it. The reply must contain several applicative values from the IDOC - so that