- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- executing c prog. with bash script
Operating System - HP-UX
1754368
Members
4565
Online
108813
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2003 05:48 AM
тАО06-07-2003 05:48 AM
executing c prog. with bash script
hi, everyone.
i wrote a bash script which works alot like "devil" - it is supposed to stay always "up" and search processes in the system.
if they arent up, it will execute them with nohup command.
so, what is the problem?
the scripts (written in bash) need to execute a csh based scripts which in turn, executes the c-program.
the whole process works fine, until after a few days, for some reason, the main bash script runs the csh script but the csh script cant execute the c program...
i know the csh scripts runs because i can see it log files running but i see no evidence that the c-prog ran.
i tryed to use rehash and clear the process memory table in the bash script, but it didnt work.
can anyone suggest any ideas?
thanks...
Oren.
i wrote a bash script which works alot like "devil" - it is supposed to stay always "up" and search processes in the system.
if they arent up, it will execute them with nohup command.
so, what is the problem?
the scripts (written in bash) need to execute a csh based scripts which in turn, executes the c-program.
the whole process works fine, until after a few days, for some reason, the main bash script runs the csh script but the csh script cant execute the c program...
i know the csh scripts runs because i can see it log files running but i see no evidence that the c-prog ran.
i tryed to use rehash and clear the process memory table in the bash script, but it didnt work.
can anyone suggest any ideas?
thanks...
Oren.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2003 05:50 AM
тАО06-07-2003 05:50 AM
Re: executing c prog. with bash script
forgot to mention, i am using a hpux-11i system on a n class machine...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2003 11:03 AM
тАО06-07-2003 11:03 AM
Re: executing c prog. with bash script
This seems like an overly complex scheme; I would probably do all of this within a C program that has been properly daemonized and make any script calls via the c system() or popen() functions. In any event, I would certainly avoid the csh. However, the key to finding your problem is to echo $status to your logfile (the equivalent of $? is bash) IMMEDIATELY after the csh script invokes the C program. A non-zero value (if the C program follows normal conventions) will indicate an error and the convention is that that value is errno.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2003 11:17 AM
тАО06-07-2003 11:17 AM
Re: executing c prog. with bash script
The other kinds of problems to look for: Does the C program run when stdin, stdout, and stdin are not terminal devices? Does the C program create some sort of lock file, semaphore, or shared memory segment to keep more than one copy of itself running?
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP