Find the answer to your Linux question:
Results 1 to 6 of 6
Hi all, Have anyone encounter a case whereby you start an application once and using ps -ef | grep, it displays a few instances of that application. By pkill that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    14

    Mulitiple Instances of an application


    Hi all,

    Have anyone encounter a case whereby you start an application once and using ps -ef | grep, it displays a few instances of that application. By pkill that application all of the instances were killed. Please advise!

    Regards
    Boon Siang

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    Well, yes, httpd for example will run more than one instance. You will notice this with other multi-threaded programs too. pkill will kill all instances of a given name.

  3. #3
    Just Joined!
    Join Date
    Feb 2007
    Posts
    14
    Thanks for the information. So is there any way to prevent this kind of situation from occuring in a self-coded applcation?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    I'm sure there is, but you'd have to ask a programmer what you would need to write to implement this functionality.

  6. #5
    Just Joined!
    Join Date
    Feb 2007
    Posts
    14
    Thanks a lot!

  7. #6
    Just Joined!
    Join Date
    Feb 2007
    Posts
    41
    Are you saying you are writing a program and you only want ONE process to start?

    An application which you write will not start more than one process unless you tell it to. This is not a trivial matter. The same goes with threads which for simplicities sake you can think of as mini processes.

Posting Permissions

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