The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Process wait time chandrakala.sg SUN Solaris 1 09-19-2007 01:04 AM
Need to execute 2 scripts, wait, execute 2 more wait, till end of file halo98 Shell Programming and Scripting 1 08-01-2006 04:42 PM
Wait for Background Process to complete gozer13 Shell Programming and Scripting 3 02-14-2005 04:25 PM
PERL: wait for process to complete dangral Shell Programming and Scripting 2 04-21-2004 03:37 PM
Process Wait on DG UX fabbas UNIX for Dummies Questions & Answers 4 01-07-2004 06:56 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-26-2008
alex_5161 alex_5161 is offline
Registered User
  
 

Join Date: Jan 2007
Location: Detroit
Posts: 124
wait command - cat it wait for not-chile process?

Did not use 'wait' yet.
How I understand by now the wait works only for child processes, started background.

Is there any other way to watch completion of any, not related process (at least, a process, owned by the same user?)

I need to start a background process, witch will be waiting for completion of the parent script.

Thank you
Alex
  #2 (permalink)  
Old 06-26-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Wink What do you know about the 'other' process?

There are many approaches to finding out about the execution and/or completion [assumed complete if not running] of another process.

1) Have the other program write a file as it starts, and delete it upon its exit. Then, you just need to check if the file exists.
2) By checking for parameters with the 'grep' at the end of a
>ps -ef | grep ___
3) By checking for the existence of specific files [assuming you can run lsof - which may need to be installed]. lsof does a list of open files.
>lsof | grep ___
  #3 (permalink)  
Old 06-26-2008
alex_5161 alex_5161 is offline
Registered User
  
 

Join Date: Jan 2007
Location: Detroit
Posts: 124
Quote:
Originally Posted by joeyg View Post
There are many approaches to finding out about the execution and/or completion [assumed complete if not running] of another process.

1) Have the other program write a file as it starts, and delete it upon its exit. Then, you just need to check if the file exists.
2) By checking for parameters with the 'grep' at the end of a
>ps -ef | grep ___
3) By checking for the existence of specific files [assuming you can run lsof - which may need to be installed]. lsof does a list of open files.
>lsof | grep ___
Thank you for answering, but it is not what I am looking for.
The 'ps ..' with grep is what I am using now, but meeting the 'wait..' command I see, that use such comand would remove big portion of codding and processing time

About the 'isof', it seems, you have once mentioned it to me, and I replay that we do not have it and I could not find any references to that on internet, and I have no ability to install anything.

All other methods I would use, if nothing else is available.

But I am looking for optimal way to perform an action.

So, by your answer I should assume that there is no in UNIX analogical command for waiting a completion of not child processes?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0