LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-04-2005, 05:41 AM   #1
jon_k
Member
 
Registered: Jul 2003
Location: Fort Worth, Texas
Distribution: Mepis Linux 2004
Posts: 547

Rep: Reputation: 30
How can I detect if a wine process isn't running?


I have an application that is closed source and buggy that crashes randomly running through Wine.

I was wondering how I could write a bash script to check for the process that is unstable and restart it if it dies automatically (which could be run every minute on cronjob)

Is it possible? Any tips? I'm ok at bash, but not good enough to do something like this.

Basically I want to detect if processname /usr/lib/wine/wineserver dies then do wineconsole foo.exe -bar option

((My current setup))
Currently I'm just doing
killall /usr/lib/wine/wineserver
wineconsole foo.exe -bar option
on a bi-hourly cronjob, but that still gives me a possible 2 hour downtime, and yet it still inconviences users (as it's a server)

Last edited by jon_k; 06-04-2005 at 05:45 AM.
 
Old 06-04-2005, 11:31 PM   #2
evilmrhenry
Member
 
Registered: Oct 2003
Distribution: Knoppix
Posts: 103

Rep: Reputation: 15
Offhand, I'd say to make a program startup script like:
Code:
#!/bin/sh
while [ 1==1 ]
do
    start_the_program
done
This will start the program, wait until it returns, then start it again and so on.
 
  


Reply



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
Trouble running wine from src wine:error while loading shared libraries: libwine.so.1 brynjarh Linux - Newbie 2 05-28-2013 10:59 AM
Running Jedi Knight with Wine, wont detect CD Niteskye Linux - Games 4 07-30-2005 09:49 AM
Running process sonu1082 Linux - Software 2 11-25-2004 05:32 AM
Process not running LinuxRam Linux - Newbie 4 09-09-2004 12:45 AM
Cant detect other computers[running on MS Windows XP] from Linux SuSe 9.0 Kals Linux - Newbie 2 12-17-2003 03:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:52 PM.

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
Open Source Consulting | Domain Registration