![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script to monitor process running on server and posting a mail if any process is dead | pradeepmacha | Shell Programming and Scripting | 13 | 03-06-2009 07:33 AM |
| Killing of a process and send a mail if the process doesnot come up within 2 minutes | Prince89 | Shell Programming and Scripting | 1 | 02-15-2008 07:10 PM |
| how to start a process and make it sleep for 5 mins and then kill that process | shrao | Shell Programming and Scripting | 6 | 03-27-2007 01:54 PM |
| Removing the only secodnary group existed from a user on SUN or HP | jquizon62 | SUN Solaris | 1 | 01-10-2006 05:17 PM |
| checking for a running process from korn cron | jph | Shell Programming and Scripting | 2 | 05-01-2005 01:27 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
checking process existed
On HP-UX, in application, if the process id has been get with the getpid() and sotred in database, then other monitor process want to check it if the process is existed, are there any system function can do it? I do not want to use the shell script, because it should use popen function to excuted and get the return, popen manupulate the pipe from process, it sometimes cause much I/O.
Last edited by Frank2004; 02-22-2008 at 11:17 PM.. |
|
||||
|
The filename preceded with pound sign (#), such as:
#hosts,#ntp.conf, #myprog, etc. Once the opendir() or readdir() encounters the above format filename, the operation exit and can not look through the directory normmally. we want to void it. |
|
||||
|
You can use ftw() or nftw(). Those require you to define a callback function that decides whether or not to continue.
I also don't see why readdir would exit, do you check return codes from opendir() and readdir() when this occurs? If you are using system() to do something, the shell being run in the system call will treat the '#' as a comment, rather than a file name. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|