The UNIX Forums
"Join the Network of UNIX System Users"


 
Subject: redirect output to log file
DomainDomain
Newbie
Rank: 1



UID 120
Digest Posts 0
Credits 0
Posts 48
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:34 AM  Profile | P.M. 
redirect output to log file



redirect output to log file



hello all,

i'm invoking the program generate-report using backticks from my perl program and redirecting the output to the log file sge-stderr.log. but when i check the process using ps command it is spawing two processes where the below code is parent process and the program generate-report as child.


please help me out of how to redirect the output to the log file without spawing two process.


code:

`/usr/bin/perl /opt/finance/bin/generate-report $urid 2>> /opt/finance/logs/sge-stderr.log`;

thanks a ton,


Top
AllyWalker
Newbie
Rank: 1



UID 48
Digest Posts 0
Credits 0
Posts 49
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:34 AM  Profile | P.M. 
when you use the system() or the backticks in perl, the program will do a fork and exec. this will result in two processes. why is there a restriction on the number of processes that you can create?
Top
 

 

All times are GMT, the time now is Mar 15, 2010 03:50 PM

Powered by Discuz! 5.0.0  © 2001-2006 UNIX Forums
Processed in 0.004748 second(s), 8 queries

Clear Cookies - Contact Us - UNIX Help - Archiver - WAP