Starting a program and remembering its pid.

I'd like making a package for the abyss web server X1.
And since it is a server, I'd like making a /etc/rc.d/'s script. Taking as base one of the existing scripts it will be easy.
But I have a problem I'd like starting the server in the background, save its pid somewhere for closing it cleanly (via kill -2) when stopping. How can I do that? I saw pid related manuals, but I got confused.
Also, it would be good (safer at least) starting the server as unprivilegiated user. atm I am using:
su --shell=/bin/sh -c'/usr/bin/abyssws' nobody
but it starts sh with abyssws inside. Can't I fork it to background?
thanks everyone.
P.S. If I manage making a decent package, should I submit it to aur?

someapplication & #start in background
echo "someapplication's pid = $!"

Similar Messages

  • Start up programs and running programs folder??

    Where can I go to disable start up programs and view any programs that are running in the background??

    The checkbox only has to do with hiding and not hiding an app on startup--although results vary.
    Deleting it, on the other hand, should have stopped it from loading.
    Check in you user/Library/LaunchAgents or user/Library/StartupItems for anything Entourage or Microsoft. However, I don't know why they would put something in there if they are using the Login Items.

  • Call tcode KSB1 in a custom program and modify its output

    I was searching the forum for finding a way to create a program that has all details from KSB1 and some details from CJ13 (WBS details) and found some related posts. But none of the posts had any details on how to actually achieve this.
    I have to do a similar thing of getting the KSB1 output and add WBS details for each line item and then give the final output.
    If you have already done this before, please elaborate on the steps how you achieved it.
    Please specify the SUBMIT that you had written to call KSB1. If I can have all details from KSB1 in my memory, then I can read that in my program and add WBS details and give the output.
    Below is what I am doing but it gives the same error as one of you had - transaction code not defined.
    DATA: FCODE TYPE SY-TCODE VALUE 'KSB1'.
    SUBMIT RKAEP000 WITH SY-TCODE = FCODE.
    Any help would be appreciated. Thanks.
    Regards,
    Shipra

    Hi,
    try this code it will work..
    the data is stored in txtlines format the data by the field wise.
    * Data Declaration
      DATA:lt_listobject TYPE TABLE OF abaplist,
        l_tab_lines TYPE i.
      DATA: txtlines(1024) TYPE c OCCURS 0 WITH HEADER LINE.
      SUBMIT rkaep000                      "the program name
         USING SELECTION-SET 'BPC TEST'          "Pass varint BPC Test
               EXPORTING LIST TO MEMORY AND RETURN.
    * Read list from memory into table
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = lt_listobject
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc  0.
    *   Error in function module &1
      ENDIF.
    *Spool content in Ascii format
      CALL FUNCTION 'LIST_TO_ASCI'
        TABLES
          listobject         = lt_listobject
          listasci           = txtlines
        EXCEPTIONS
          empty_list         = 1
          list_index_invalid = 2
          OTHERS             = 3.
      CALL FUNCTION 'WRITE_LIST'       "Display report same as in KSB1... else not required
      TABLES
        listobject = lt_listobject
      EXCEPTIONS
        empty_list = 1
        OTHERS     = 2.
    CALL FUNCTION 'LIST_FREE_MEMORY'
      TABLES
        listobject = lt_listobject.
      LOOP AT txtlines.   "data will be stored in this..
        " split the txtlines-tdline with | and move into another internal table and do the validation...
      endloop.
    Prabhudas
    Edited by: Prabhu Das on May 20, 2009 11:28 PM

  • How do I transfer over my Pages program and all its files to my new mac?

    I recently bought a macbook air and would like to continue to use my Pages program that I have been using on my old Macbook pro. Does anyone know if I can redownload it from the Apple store without having to pay or if there is another way I can access the program and all my old files?
    Thanks!

    The Apple Store is not the same as the Mac App Store, which is what I think KarenSelena is referring to when she says "Apps store." So, the question is, did you buy a retail box or a license for a downloaded trial of iWork '09 or did you buy the individual apps from the Mac App Store?
    If you did buy Pages from the Mac App Store you can go to the "purchases" section of the App Store.app & download it again using the same Apple ID as before.

  • Calling the standard program in program and getting its output in int table

    Hi there,
    I have a requirement, where I need to call the standard program (of transaction CJI3) in my Y program. CJI3 transaction produces a ALV GRID output. I need to use that data for further processing. I am getting following problems:
    1. I tried to use SUBMIT ... EXPORTING TO MEMORY statement. I need to pass the company code for the selection, but the company code is in the dynamic selection. So not getting how to pass them.
    2. Just a doubt. Can we export the ALV GRID to the memory an retrieve it back using import?
    3. I did tried to use SUBMIT .....  statement using only the parameters which are on the selection screen. However the control went to CJI3 transaction and gave an error message 'Please select "from database" or "from archive" '. Did not understood that, any IDEA?
    Or is there any other way with which I can accomplish my requirement of getting the data in my program to manipulate, other than SUBMIT.
    Points will be rewarded.
    Thanks,
    Ganesh Khumse

    Hi,
    point 1:
    SUBMIT ... EXPORTING TO MEMORY will never work, because it displays the information in an ALV grid and that grid is waiting for user interaction for manipulating the information.
    point 2:
    no, you cannot export the content of an ALV grid to the memory
    point 3:
    must you get records in an internal table or must you feed the transaction, so that this one performs a task ??  for first option read below and for the other option you might work with BDC and Transaction Recorder.
    what you have to do is read the code of transaction CJI3 in order to understand what it does, where the information is read from and what is the internal table that passes the values to the ALV Grid. You might find a user exit in the code for manipulating that information or you might create an enhancement point if there´s no user exit.

  • I tried to update my iPad 2 to ios 5. It starts out fine and once its done, it tells me the network connection timed out and that I should try again, even thought I have internet. How do I update my iPad without it doing that?

    I need help updating my iPad to ios 5, without it telling me that the network connection timed out.

    You can download the correct iOS upgrade manually to your computer and then apply it to your iPad using the iTunes app on your computer. After you have downloaded the correct upgrade press the Option/Alt key and click on the Check for Update button in the iTunes app. Browse to the file on your computer, select it and iTunes will do the rest to install it.
    http://ipadstory.net/download-ios-5-final-ipsw-files/

  • Keeps asking me for serial number when starting up program and when entered it tells me it's not a valid serial number, but it's the one that came with my software

    I purchased CS6 Design and Web Premium through the Department of Education Australia just over a year ago and now I can no longer access my software. It keeps asking me for my serial number, but when I enter the serial number that came with the product it tells me it is invalid???

    Check with the school to make sure the licensing should still be valid.  Some school make arrangements only for temporary licensing.
    You can also try checking with Adobe Support thru chat.
    For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • In Premiere CS5, I opened an old project I had edited using Premiere CS3 and now its all pixelated!

    Hi everyone. I just got Premiere Pro CS5 and started the program and opened up an old project I had edited using Premiere Pro CS3. Premiere Pro CS5 said it had to convert the project for editing in CS5. I clicked "okay" and the project opened up in CS5. Now, when I play the project on the timeline, everything has some pixelation! The footage was nice and sharp without any artifacts when I edited in Premiere Pro CS3. How do I get rid of this pixelation in CS5 so the footage looks like it is supposed to?! Thanks.

    Well, there's really no rationale for the project conversion to somehow drastically alter the appearance of footage, particularly something like DVCPROHD. Adobe changed the way its software handles pixel aspect ratios between CS3 and CS4, but that affects SD footage, not HD footage. There may be some degree of weirdness since in CS3, you had a project that was set to a specific format/frame rate/codec/whatever, whereas in CS4 and later the project is just a container for sequences of any and all types.
    Instead of opening the original project and going through the conversion, try creating a new project and importing the old project as if it were any other media file. Premiere will reconstruct the old project within the new one; this probably is not going to have any change, but it's worth a shot.
    Can you describe (or better, show) the pixelation you're referring to? It's hard to visualize without, well, a visual, and that might help better pinpoint the issue. Also, is the pixelation only during playback, or is while the clip is paused in the sequence, as well?

  • Im new to java programming and cant this program to help

    Dear All
    I using a Java Book called Java Gently written by J.Bishop Im working on a program and its typed out correctly and compiled corretcly, but for some reason wont work i dont know what parameters i need to enter.
    take a look:
    class CurioStore1 {
    * Write a description of class CurioStore1 here.
    * @author (your name)
    * @version (a version number or a date)
    // Declare three object variables
    Curio mugs, tshirts, carvings;
    // The constructor for the program is
    // where the inital work gets done
    CurioStore1 () {
    // Create three objects with different initial values
    mugs = new Curio ("Traditional mugs", 6, "beaded in Ndebele style");
    tshirts = new Curio ("Traditional mugs" , 30, "sizes M to XL");
    carvings = new Curio ("Masks", 80, "carved in wood");
    // Print out a header
    System.out.println ("The Polelo Curio Store sells\n");
    // Print the values contained in each of the objects
    mugs.write();
    tshirts.write();
    carvings.write();
    // All programs must have a main method
    public static void main (String [ ] args) {
    // Start the program running from its constructor
    new CurioStore1 ();
    class Curio {
    //Declare variables related to a curio
    String name;
    int price;
    String description;
    //The constructor copies the initial values
    // into the ogjects variables
    Curio (String n, int p, String d) {
    name = n;
    price = p;
    description = d;
    // a method to ouput the vlaurd of the object's variables
    void write () {
    System.out.println (name + " " + description + " for G" + price);

    What is currently happening when you attempt to run the above program?
    Try changing your main method as I have changed it below and see if anything is displayed.
    class CurioStore1 {
    * Write a description of class CurioStore1 here.
    * @author (your name)
    * @version (a version number or a date)
    // Declare three object variables
    Curio mugs, tshirts, carvings;
    // The constructor for the program is
    // where the inital work gets done
    CurioStore1 () {
    // Create three objects with different initial
    ial values
    mugs = new Curio ("Traditional mugs", 6, "beaded
    ded in Ndebele style");
    tshirts = new Curio ("Traditional mugs" , 30,
    30, "sizes M to XL");
    carvings = new Curio ("Masks", 80, "carved in
    in wood");
    // Print out a header
    System.out.println ("The Polelo Curio Store
    ore sells\n");
    // Print the values contained in each of the
    the objects
    mugs.write();
    tshirts.write();
    carvings.write();
    // All programs must have a main method
    public static void main (String [ ] args) {
    // Start the program running from its constructor
    System.out.println ("before constructor");
    new CurioStore1 ();
    System.out.println ("after constructor");
    class Curio {
    //Declare variables related to a curio
    String name;
    int price;
    String description;
    //The constructor copies the initial values
    // into the ogjects variables
    Curio (String n, int p, String d) {
    name = n;
    price = p;
    description = d;
    // a method to ouput the vlaurd of the object's
    ect's variables
    void write () {
    System.out.println (name + " " + description +
    ption + " for G" + price);

  • My Mac got hacked. I was working on a word document when the computer suddenly started typing meaningful sentences on its own that describes how the hacker is skillful. At the that time I was on a password protected wifi and file sharing was off.

    This is the first time I get hacked this bad. I was working on a microsoft word document when the computer suddenly started typing meaningful sentences on its own that describes how skillfull the hacker is. At the that time I was on a friends wifi network that is password protected (not sure about the encyrption), the Os X Firewall was on. I was using the admin profile, however, file sharing was off. I'm very careful not to install any suspecious 3rd party software.
    So far I have verified permissions and fixed some errors there, and changed passwords.
    Do I have to erase/format my computer and reinstall the Os? If so is it adequte to use the internet recovery tool or will it use old and possibly infected EFI/Root files?
    Would appreciate the advice of all the Mac experts out there. Thanks

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. 
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click anywhere in the line of text below on this page to select it:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -ef
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting. A TextEdit window will open with the output of the command. If the command produced no output, the window will be empty. Post the contents of the TextEdit window (not the Terminal window), if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    { sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo; sudo launchctl getenv DYLD_INSERT_LIBRARIES; echo; sudo defaults read com.apple.loginwindow LoginHook; echo; sudo crontab -l; } 2> /dev/null | open -ef
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3
    { launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}'; echo; launchctl getenv DYLD_INSERT_LIBRARIES; echo; crontab -l 2> /dev/null; } | open -ef
    Step 4
    ls -A /e*/{cr,la,mach}* {,/}Lib*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts .la* 2> /dev/null | open -ef
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 5
    osascript -e 'tell application "System Events" to get name of login items' | open -ef
    Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • After updating my latest iTunes, the currupted program won't open or start, even tried deleting the program and reinstall.

    On my Windows 7, my latest iTune, after udating to the latest version, I cannot open or start the program.  I even deleted the program from my system and then reinstall/download iTune from Apple Store, but the same problem persist.  Anyway to get back my iTune back?

    Hey there nkg0319,
    It sounds like you have uninstalled the iTunes application but you are still not able to launch it after a recent update. I would recommend uninstalling the iTunes application and its associated files with the following article:
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    http://support.apple.com/kb/ht1923
    Then download iTunes again, with this link:
    http://www.apple.com/itunes/download/
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • I have installled PE12,I have registrated it (serie number) and I have made an Adobe- ID. (I can find there my registrated product). Still, when I want to start the program, there is a screen that indicates that i have "to registrate PE within 7 days" , W

    I have installled PE12,I have registrated it (serie number) and I have made an Adobe- ID. (I can find there my registrated product). Still, when I want to start the program, there is a screen that indicates that i have "to registrate PE within 7 days" , When iI continuer (next sceen) there is a message that the proces can not proceed for "I need  an internet commection" which I have!!!! When this problem does not disappear  I have to contact Adobe ??.......  So please can you help me. I am already many hours trying to get started :-(

    CS2 is very old and reached its "end of life" a while back.  So probably won't run on modern operating systems.  If you can still run it, you'll need to uninstall what you have and re-install with the download link below to activate it.
    Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3
    Nancy O.

  • Systemd and starting another program after OpenVPN finishes connecting

    I have a program that I want to launch only when OpenVPN has established a connection.  The problem is it is instead starting too soon, and going out into the Internet first before later using the OpenVPN connection.  I am having it start after OpenVPN with the following two lines in the .service file:
    Requires=[email protected]
    After=[email protected]
    Is there a proper way to have it instead start after OpenVPN finishes its connection?  Right now I manually can start it after systemctl status [email protected]
    reports:
    Initialization Sequence Completed
    But that manually method is very much suboptimal.  I also want to have this other program start at boot which would completely preclude the manual method.

    What if you use Requisite=[email protected]?  As I understand it, that will ensure that the service is active and running before allowing the next to start...
    Additionally, if you want to be able to start the unit manually, without the openvpn.service started (that is by using "systemctl start <whatever>"), then you could use RequisiteOverridable=[email protected]
    Edit: I guess there is also the additional question of whether the unit reports a success after starting the binary or actually making a connection.  I have never used openvpn, so I don't know about this.  But take, for example, the network.target and the network management services.  With the exception of NetworkManager.service (more specifically the NetworkManager-wait-online.service), the service is reported as successful, and the network.target is reached when the daemon itself is started, not when a full connection has been established.  If it reports success before full connection, that will make this much harder.
    Last edited by WonderWoofy (2013-07-05 17:50:00)

  • Yahoo is taking over and nothing is fixing it. oh and every time i start Firefox is acts like its starting up for the first time every time.

    when i open Firefox its says something about checking add-ons or something for like 1sec then opens up with the main Firefox home page and the Firefox Google page.
    that and the main issue is the whole yahoo thing, i HATE yahoo and its taking over my Firefox. now i have tried going into about:config and changing the keyword.URL back to Google but i get nothing and even if i find something that works as soon as i close it and reopen it its all reset.

    Hi,
    If you have another Yahoo application installed, there may be a legitimate helper app that runs in the background and detects changes to Yahoo settings and reverts it. You can check for any such program in the Start menu and also in the OS Control Panel Programs and Features (Add/Remove Programs). Please also check '''Tools''' ('''Alt''' + '''T''') > '''Add-ons''', click '''Extensions''' on the left, for any Yahoo add-ons and try disabling it or change it's settings.
    Regarding the second issue: In Firefox, '''Help''' ('''Alt''' + '''H''') > '''Troubleshooting Information''' > '''Open Containing Folder'''. This opens your current [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder & Files.] Exit Firefox and delete the files (not the folder) named '''extensions.'''*.

  • Hello  I upgraed my iphone to ios 7 but its dosent work like app stor dosent install any brogram or update programs and its slow and stuck plz help me

    Hello
    I upgraed my iphone to ios 7 but its dosent work like app stor dosent install any brogram or update programs and its slow and stuck plz help me

    My iPhone 5 wouldn't start after I turned it off a few minutes after writing this. It went into recovery mode and I had no choice but to connect to iTunes on PC and restore.
    I restored to factory setting first, just to validate my phone was okay. For a second consecutive iOS update, the  iPhone 5 did not update smoothly while connected to PC and iTunes - I had to retry two times before the progress bar for the update showed. (The exact same problem with the restart occured when I updated to 7.0.4.)
    The good news is that I was ultimately able to restore the iPhone 5 to factory settings while running iOS 7.0.6. I did have a backup from about a month ago lying around and was able to successfully restore with that as well, so the damage done is almost negligible since I had my contacts, notes, mail, etc. backed up to iCloud.
    Once I completed both restores, the sync with iTunes worked fine.

Maybe you are looking for

  • ABAP Query (Sq01)Modification

    Hi Experts, I am new to ABAP queries. I need to add an additonal field (optional field) into the output of an existing ABAP query. On the selection screen i am planning to include this field along with a check box such that if i click on the check bo

  • SAINT Update on phase IMPORT ABAP Dictionary objects.

    Hi All, While uploading package using SAINT i am facing some errors. I am at phase CHECK_REQUIREMENTS and RUN_SPDD just completed, and getting the below message button Repeat  Skip Cust.Cockpit "Phase CHECK_REQUIREMENTS: Explanation of Errors Open Da

  • GOOD tutorial for java?

    Hi, I am looking for a good tutorial for java. I cant understand my teacher's lectures, because they are always presented as a slide show and she just reads the slides in a monotone voice. (Not to mention her thick asian accent). So any one? *Note=A

  • Interactive widgets on master slide

    My understanding is that interactive widgets cannot go on master slides. Is this because they don't work or don't work consistently? A co-worker of mine made this widget https://acrobat.com/#d=9N0LRqiAhOpCfzJB5mCUIg The idea was to have play/pause fu

  • PeopleSoft Query View

    Folks, In Application Designer, I create a record with its type Query View. Because Query View has not connected with SQL Editor in the Tool, only SQL View and Dynamic View connect with SQL Editor in which we type in SQL statement, I don't know where