|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
killing a process on a serverHi,
I need to launch a process on the 4D server from a client. So far, no problem. However, at some point I'd like to be able to kill that process on the server from a client. 4D has commands to delay, pause and resume processes, but nothing I can see to kill a process. At this point I'm thinking that I may have to make the server process sensitive to a semaphore and then tell it to die via the semaphore. Has anyone else tackled this problem? Have I overlooked something? I'm open to suggestions. Thanks in advance. Allen ------------------------- Allen Matlick allen@... 805-893-5219 ********************************************************************** 4D Basics hosted by 4D, Inc. http://www.4D.com/ 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com To Unsubscribe: mailto:4DBasics-off@... ********************************************************************** |
|
|
Re: killing a process on a serverHi Allen,
"Killing" a process is generally not a good idea unless the process is out of control. The process should end gracefully (which basically means the method finishes executing). There are many ways to handle interprocess communication: -Variables -Semaphores -Records in a table Which one you choose is ultimately up to you but the point I want to make is the process should wait until something tells it to end, not be "killed". Also keep in mind this applies to quitting the database: the processes should be told do shut down even when quitting. 4D will eventually kill them, of course, but that's not a graceful way to end. I hope this makes sense. Kind regards, Josh Fletcher Allen Matlick wrote: > Hi, > > I need to launch a process on the 4D server from a client. So far, no > problem. > > However, at some point I'd like to be able to kill that process on the > server from a client. 4D has commands to delay, pause and resume > processes, but nothing I can see to kill a process. > > At this point I'm thinking that I may have to make the server process > sensitive to a semaphore and then tell it to die via the semaphore. > > Has anyone else tackled this problem? Have I overlooked something? > I'm open to suggestions. > > Thanks in advance. > > Allen -- Josh Fletcher Technical Services Team Member 4D, Inc. ********************************************************************** 4D Basics hosted by 4D, Inc. http://www.4D.com/ 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com To Unsubscribe: mailto:4DBasics-off@... ********************************************************************** |
|
|
RE: killing a process on a serverYou haven't overlooked anything; there is no "kill process" command.
I like to steer clear of a semaphore when ever possible, so I use a inter-process variable. Create a process to loop and wait, perform some action and check the variable. When you want the process to die, run another process on the server that sets the inter-process variable to false. Make sure you call your routine to kill the process at shutdown too. Thanks, Mike Mike Placko NowData Corporation 2970 Judicial Rd. Suite 210 Burnsville, MN 55337 952-808-0504 ext. 208 mike@... http://www.nowdata.com -----Original Message----- From: 4DBasics@... [mailto:4DBasics@...] On Behalf Of Allen Matlick Sent: Wednesday, July 09, 2008 4:14 PM To: 4D Basics List Subject: killing a process on a server Hi, I need to launch a process on the 4D server from a client. So far, no problem. However, at some point I'd like to be able to kill that process on the server from a client. 4D has commands to delay, pause and resume processes, but nothing I can see to kill a process. At this point I'm thinking that I may have to make the server process sensitive to a semaphore and then tell it to die via the semaphore. Has anyone else tackled this problem? Have I overlooked something? I'm open to suggestions. Thanks in advance. Allen ------------------------- Allen Matlick allen@... 805-893-5219 ********************************************************************** 4D Basics hosted by 4D, Inc. http://www.4D.com/ 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com To Unsubscribe: mailto:4DBasics-off@... ********************************************************************** ********************************************************************** 4D Basics hosted by 4D, Inc. http://www.4D.com/ 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com To Unsubscribe: mailto:4DBasics-off@... ********************************************************************** |
| Free Forum Powered by Nabble | Forum Help |