Article View: borland.public.jbuilder.java.language
Article #7343Re: ?? Prevent starting a Programm twice???
From: Petar Banicevic
Date: Wed, 27 Jun 2001 17:53
Date: Wed, 27 Jun 2001 17:53
38 lines
2070 bytes
2070 bytes
Can you tell me please how to do that ? How to retreive a list of processes ? "dnoyeB" <lamont_gilbert @ rigidsoftware.com> wrote in message news:3b39da80$1_1@dnews... > You can alternately check the running processes for a processes that carries > your name. > > > > > "Joi Ellis [TeamB]" <joi@aravox.com> wrote in message > news:3b39d418_1@dnews... > > Peter Lustig <kschnepp@web.de> wrote: > > > > > I am searching for an easy way to prevent starting the same Programm > manifold on a Computer. > > > > Have the program open a ServerSocket on a specific port. If it is able to > > open the port, then it's the only instance of the program running. > > If it can't open the socket, either there are multiple copies of the > program > > running, or something else is using the port. You can make the port user > > configurable if you need to, as long as the program writes the new port > number > > someplace permanent > > > > > > -- > > Joi Ellis (TeamB) http://www.teamb.com/ > > No direct email, please. > > For best results, post on news server newsgroups.borland.com! > > Newsgroup Info: http://www.borland.com/newsgroups/guide.html > >
Technical Details
Message-ID:
<3b3a1f7a_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnewsReferences:
<3b398972$1_1@dnews> <3b39d418_1@dnews> <3b39da80$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,5fc10420f14b88fa X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-27 11:07:58 PST From: "Petar Banicevic" <petar_b@usa.net> Newsgroups: borland.public.jbuilder.java.language References: <3b398972$1_1@dnews> <3b39d418_1@dnews> <3b39da80$1_1@dnews> Subject: Re: ?? Prevent starting a Programm twice??? Date: Wed, 27 Jun 2001 19:53:27 +0200 Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 12.98.142.222 Message-ID: <3b3a1f7a_1@dnews> X-Trace: dnews 993664890 12.98.142.222 (27 Jun 2001 11:01:30 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews