Find the answer to your Linux question:
Results 1 to 9 of 9
hi friends i have ported linux into arm and i want to run two background process on target i have two c programs a.c and b.c i have cross compiled ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    13

    [SOLVED] how to run two background process


    hi friends i have ported linux into arm and i want to run two background process on target

    i have two c programs a.c and b.c
    i have cross compiled them as

    arm-linux-gcc -o a a.c
    arm-linux-gcc -o b b.c

    now i have transfered both object file a and b on arm
    but i dont know how two run two background process
    i want to run both the process at same time,,,,,

    plz help me how can i run this

  2. #2
    Just Joined!
    Join Date
    Oct 2010
    Posts
    16
    You can start the process and push them to backgroud with bg command.

  3. #3
    Linux User
    Join Date
    Dec 2009
    Posts
    264
    If I wanna start a program in the background I simply add a & at the end.
    ./a &
    ./b &
    should do is.

  4. #4
    Just Joined!
    Join Date
    Feb 2009
    Posts
    22
    Quote Originally Posted by praveenkv1988 View Post
    You can start the process and push them to backgroud with bg command.
    directly typing bg over a running process wont do anything, rather issue a CTRL-z (to stop it, SIGSTOP) and then type bg to run it in back ground.
    BTW, fg will again push is to foreground.

  5. #5
    Just Joined!
    Join Date
    Nov 2007
    Posts
    7
    A little better method is using the nohup as well (stands for no hangup after logout, so when your shell ends, it keeps on running)
    So:
    # nohup ./a &
    # nohup ./b &

    Nohup will also redirect all stdout to go in the textfile nohup.out.

  6. #6
    Just Joined!
    Join Date
    Apr 2005
    Location
    Central Florida
    Posts
    12
    check man pushd and popd just stack them up.

  7. #7
    Linux Newbie unlimitedscolobb's Avatar
    Join Date
    Jan 2008
    Posts
    120
    Quote Originally Posted by genomega View Post
    check man pushd and popd just stack them up.
    pushd and popd are commands for managing your shell's directory stack.

    pushd and popd - Wikipedia, the free encyclopedia

  8. #8
    Just Joined!
    Join Date
    Apr 2005
    Location
    Central Florida
    Posts
    12
    I know what they do, just trying to get the o-p to do a little research, sounds like a homework assignment.

    check: command1 || command2 or command1 && command2

    Ther are many ways to do what he wants to do.

  9. #9
    Just Joined!
    Join Date
    Apr 2010
    Posts
    13

    thanks friends it got solved

    nohup ./a &./b &

    with this command both will run in background

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •