10-28-2008
Can you tell me more about your application? What's the purpose of just forking and sleeping?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
I have a script, where i need to execute the follwoing scripts/commands in my script. but those should be executed one by one
cd /aa/205/jams
.cmd/mass_all.sh - -> execution of this will take atleast 20-30mins
cd $HOME/precompile
ant-Ddir.location=$HOME/tomcat/webapps - -> execution of... (1 Reply)
Discussion started by: gkrishnag
1 Replies
2. Shell Programming and Scripting
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... (2 Replies)
Discussion started by: alex_5161
2 Replies
3. Shell Programming and Scripting
Hi All,
I have a script which runs 3 scripts. The first script creates two files. The other two scripts should run only when the files are created.
I tried the following for loop , but it is not working. Can someone please help me.
while ; do
# Sleep until file does exists/is created... (4 Replies)
Discussion started by: nua7
4 Replies
4. Red Hat
hi all,
We are trying to run a process in the background and in the process we call fork ;and wait for the child process to finish .We find that the died = wait(&status); happens after 10 seconds randomly and sometimes completes in time (within 1 sec)
This behavior is seen only when the... (0 Replies)
Discussion started by: vishnu.priya
0 Replies
5. Red Hat
hi all,
We are trying to run a process in the background and in the process we call fork ;and wait for the child process to finish .We find that the died = wait(&status); happens after 10 seconds randomly and sometimes completes in time (within 1 sec)
This behavior is seen only when the... (1 Reply)
Discussion started by: vishnu.priya
1 Replies
6. Programming
Hello everybody.I want to make clear that i am not going to ask from anybody to build my asignement but i have a big problem. I can't seem to find anywhere ONE good example on C about what i am trying to do:wall:.I think it is simple. All i ask is one example, even a link is fine.
So, i want to... (1 Reply)
Discussion started by: Cuervo
1 Replies
7. Programming
Hi All,
I have a program for class that needs to do the following:
1. Print the directory entries from the current directory using ncurses
2. Provide a prompt next to each directory entry and allow the user to enter commands that may or may not be about the file
3. Execute those commands in... (1 Reply)
Discussion started by: afulldevnull
1 Replies
8. Shell Programming and Scripting
Hi,
I have a script that run every 10 minutes, from a specific timeframe of the day, for example 0500 - 1900.
The script is some sort of checker script for an application log file and check for errors and email us if there is error/s reported in the log.
At the moment, I schedule it... (1 Reply)
Discussion started by: newbie_01
1 Replies
9. BSD
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies
10. UNIX for Advanced & Expert Users
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies
LEARN ABOUT MOJAVE
sub::defer5.18
Sub::Defer(3) User Contributed Perl Documentation Sub::Defer(3)
NAME
Sub::Defer - defer generation of subroutines until they are first called
SYNOPSIS
use Sub::Defer;
my $deferred = defer_sub 'Logger::time_since_first_log' => sub {
my $t = time;
sub { time - $t };
};
Logger->time_since_first_log; # returns 0 and replaces itself
Logger->time_since_first_log; # returns time - $t
DESCRIPTION
These subroutines provide the user with a convenient way to defer creation of subroutines and methods until they are first called.
SUBROUTINES
defer_sub
my $coderef = defer_sub $name => sub { ... };
This subroutine returns a coderef that encapsulates the provided sub - when it is first called, the provided sub is called and is -itself-
expected to return a subroutine which will be goto'ed to on subsequent calls.
If a name is provided, this also installs the sub as that name - and when the subroutine is undeferred will re-install the final version
for speed.
undefer_sub
my $coderef = undefer_sub &Foo::name;
If the passed coderef has been deferred this will "undefer" it. If the passed coderef has not been deferred, this will just return it.
If this is confusing, take a look at the example in the "SYNOPSIS".
undefer_all
undefer_all();
This will undefer all defered subs in one go. This can be very useful in a forking environment where child processes would each have to
undefer the same subs. By calling this just before you start forking children you can undefer all currently deferred subs in the parent so
that the children do not have to do it.
SUPPORT
See Moo for support and contact information.
AUTHORS
See Moo for authors.
COPYRIGHT AND LICENSE
See Moo for the copyright and license.
perl v5.18.2 2013-12-31 Sub::Defer(3)