Sponsored Content
Top Forums Shell Programming and Scripting Perl Background Process - Finshed Yet? Post 302145665 by Yogesh Sawant on Thursday 15th of November 2007 01:14:58 AM
Old 11-15-2007
for finer control over processes, check out Proc::Simple
Please note that sub calc () is a subroutine, and not a process.

If you are calling this subroutine from some other place, then the regular behavior is what you have described:
Code:
#!/usr/bin/perl
# sub_trial.pl
use strict;
sub calc ()
{
    print "in calc() now ... \n";
    sleep 10;  # wait for 10 seconds
      # or do something here
}
print "we're in main script ... \n";
calc ();
print "and continued ... \n";

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

capture the process id when starting a background process

Hello all, How do I start a background process and save the process id to a file on my system. For example %wait 5 & will execute and print the process id. I can't figure out how to get it to a file. I've tried: > filename 0>filename 1>filename. Any assistance is most appreciated. Thanks, Jim... (10 Replies)
Discussion started by: jleavitt
10 Replies

2. UNIX for Dummies Questions & Answers

background process

How, can I hide background process's output? (5 Replies)
Discussion started by: zylwyz
5 Replies

3. Shell Programming and Scripting

background process

can anybody plz tell me how can i find the background processes running. (2 Replies)
Discussion started by: Raom
2 Replies

4. Shell Programming and Scripting

background process

i gave a copy process in the background( to copy around 100GB) , while in progress, the session got terminated. when i relogged in and checked the destination folder the copying was in progress... how could it happen(copying) when the shell terminates??? :rolleyes: (2 Replies)
Discussion started by: vinod.thayil
2 Replies

5. Shell Programming and Scripting

How to process and run a program in the background in perl?

Hi, I have a query about processing and running Perl program at the background. I have HTML file called Userform.html which accepts input from the user. As soon as input is given the contol goes to get.cgi (get.cgi does some processing and computing tasks). Actually get .cgi takes more... (0 Replies)
Discussion started by: vanitham
0 Replies

6. UNIX for Dummies Questions & Answers

Background Process

I need to submit a script that will continue to run after logging out and after a reboot or shutdown. I entered the following: nohup script & The script continues to run in the background after logging off the system but is killed after a reboot or shutdown. Any help would be greatly... (1 Reply)
Discussion started by: powwm
1 Replies

7. UNIX for Dummies Questions & Answers

Script to start background process and then kill process

What I need to learn is how to use a script that launches background processes, and then kills those processes as needed. The script successfully launches the script. But how do I check to see if the job exists before I kill it? I know my problem is mostly failure to understand parameter... (4 Replies)
Discussion started by: holocene
4 Replies

8. Shell Programming and Scripting

How to put FTP process as a background process/job in perl?

Hi, I am using net::ftp for transferring files now i am trying in the same Linux server as a result ftp is very fast but if the server is other location (remote) then the file transferred will be time consuming. So i want try putting FTP part as a background process. I am unaware how to do... (5 Replies)
Discussion started by: vanitham
5 Replies

9. Shell Programming and Scripting

How to call a background process in perl?

Hi, I want to put the following code as a parallel or background process The program is as below: $n=10; #Count of files to be created. for($j=0;$j<=$n;$j++) { open(FH,">files_$j.txt") || warn "cannot create a file\n"; { print FH "count of file: $j\n"; #Sample data to be written. just... (5 Replies)
Discussion started by: vanitham
5 Replies

10. Shell Programming and Scripting

Make background process interact with fg process

Hi, I have written a menu driven shell script in which as per the choice, I run the another script on background. For eg: 1. get info 2)process info 3)modify info All the operations have different scripts which i schedule in background using &. However I wish to display the error... (0 Replies)
Discussion started by: ashima jain
0 Replies
tntnet(8)							Tntnet users guide							 tntnet(8)

NAME
tntnet - web application server for c++ SYNOPSIS
tntnet [-c file] [--logall] tntnet -C [-q query-string] [componentId ...] DESCRIPTION
This manual page documents briefly the tntnet command. tntnet is a web server that can generate dynamic content via precompiled C++ modules. OPTIONS
A summary of options is included below. -c file Use file as the configuration file. If the -c is omitted, the first nonoption argument is used as the config file. --logall Initialize logging earlier. Normally logging is initialized after starting the listeners and changing user so that logfiles are cre- ated with the right owner. For debugging reasons this option forces to do that earlier. -C Call components and print the result to stdout instead of starting tntnet as a webserver -q query-string In -C mode pass this query string to the component. The option may be repeated multiple times to pass name-value-pairs easily. EXAMPLE
tntnet -C -q arg1=35 -q arg2=7 -q op=/ calc@calc calls the component calc@calc with query parameters and prints the result to stdout. FILES
/etc/tntnet/tntnet.conf The default configuration file. ENVIRONMENT
TNTNET_CONF This is checked for the configuration file name if it is not specified on the command line. AUTHOR
tntnet was written by Tommi Makitalo <tommi@tntnet.org>. This manual page was written by Kari Pahula <kaol@debian.org>, for the Debian project (but may be used by others). SEE ALSO
tntnet-config(1), ecpp(7), ecppc(1), ecppl(1), ecppll(1), tntnet.conf(7), tntnet.properties(7). More documentation can be found in /usr/share/doc/tntnet-doc/. Tntnet July 23, 2006 tntnet(8)
All times are GMT -4. The time now is 07:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy