LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-21-2012, 04:50 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
Modify script


in my linux system , we have a program ( it is a binary program , I do not have the source code ) which will do something in the database . In the program , there is a exit function , when select exit , it will quit the program and go to linux shell , this program works fine.

Now , I would like to do modify for this program -- I would like to send out a mail to me once quitted this program , but how to know (detect) the program is quitted ?

thx


** may be my question is not clear enough , I will reply it if anything is not clear.
 
Old 05-21-2012, 04:55 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,792

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
You would rather try to construct a wrapper script. It means it executes the binary as is and finally sends a message. Modifying a binary without knowing/having the source is not an easy task, you must know assembler very well and also you need to reverse engineer that code.
 
Old 05-21-2012, 04:57 AM   #3
em31amit
Member
 
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190

Rep: Reputation: 55
Create a shell script which find its pid from ps output and check whether it is exists into it on specific time interval else send a email .. I will create script too but little later on..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
modify the perl script so that I could apply the script to all the files casualzone Linux - Software 3 05-06-2011 05:23 AM
Modify Perl script to work with txt - Permissions script joangopan Programming 4 09-14-2007 10:20 PM
REQ: Help to modify the following script Rick069 Linux - Software 1 07-01-2007 06:42 PM
which rc.d script does netconf modify? stevesk Slackware 4 07-10-2006 11:10 AM
script to modify url gazman1 Programming 2 06-14-2006 10:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration