473,671 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A way for launch an app monitor

Hello,

I'm in the way for creating an application and its monitor. Yes, there
are 2 applications: The main app, and a monitor. The last one monitors
the main application for keeping it alive, and viceversa. But if I
close the main app, I want to close the monitor.

That is very easy under nt systems, but in 98 is a little more tricky
because of the problem with closing processes.

For example, I can't use the following code on a win98 machine:

def FindPID(exename ):
"""
usage:
pid=FindPID("py thonw.exe")
print pid
"""
a = os.popen4('task list /FI "IMAGENAME eq '+exename+'"')
a[0].flush()
try:
info=a[1].readlines()[3].split()
except:
info=[exename,"NotFou nd"]
return info[1] #PID

because the "tasklist" command doesn't exist on win98. Also, I tried to
install the kill.exe and a dont-remember-dll (from the Win98 Resource
Kit), but it doesn't work.

So my solution (need help on this) is that I have been thinking on
letting the monitor listen for socket connection. Through this, the
main app can tell him to close when the main app closes correctly. Do
you think this is well thought? Any suggestions?

Daniel

Nov 22 '05 #1
0 1010

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3155
by: gilles.carali | last post by:
Hi, I need to know how to launch parameted DB2 AS 400 program (CLP / RPG) from PHP 4.3 passing trough ODBC connection ? The environment is : OS : Linux distribution Debian Etch Serveur : Http Apache 2 Module : PHP 4.3 Client : Ibm_DB2 version 9
5
14809
by: jbenner | last post by:
I have opened a PMR for this with IBM, and am not asking for advice from the DB2 DBA community. I am posting this as an FYI that DB2 Health Monitor, even at the latest version of DB2, still can cause huge problems with slow connect times and heavy resource locking in high concurrency / high transaction volume environments. I have an OLTP with 30-90 transactions per second activity, and start of Health Monitor every 2 hours was crashing our...
3
3382
by: tombrogan3 | last post by:
Hi, I'm writing a service which has to monitor a database looking for new feeds (basically a few hundred thousand rows with a common id). When it finds a new feed I can either: 1) Process it on the current thread (not ideal as the app must be seen to be responding to new feeds straight away, and this processing can take up to an hour). 2) Launch a new thread to process the feed. 3) Launch a new process to process the feed.
0
1411
by: =?Utf-8?B?amFtZXNjaGk=?= | last post by:
I'm trying to do is to launch Powerpoint Viever 2007 in my secondary screen. I'm still having issues resizing the pptviewer.exe output when moving the window to the second monitor. Here's my code so far: Process view = new Process(); view.EnableRaisingEvents = true; view.StartInfo.WindowStyle = ProcessWindowStyle.Normal; view.StartInfo.CreateNoWindow = true;
0
8473
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8911
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4402
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2808
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.