The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
assigning variables from standard output whamchaxed UNIX for Dummies Questions & Answers 2 12-04-2007 07:31 PM
redirected output not going to file for all cases brdholman UNIX for Dummies Questions & Answers 7 10-10-2007 03:07 PM
Standard output and redirection jerardfjay Shell Programming and Scripting 2 06-27-2005 12:03 PM
redirected output slavam Shell Programming and Scripting 2 10-12-2004 02:47 PM
Standard Output dbrundrett Shell Programming and Scripting 3 05-21-2004 06:08 PM

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 09-19-2003
soorajmu soorajmu is offline
Registered User
  
 

Join Date: Jun 2003
Posts: 5
Unhappy Standard output not redirected from /bin/sh

I have an application which has a lot of cout & cerr statements.

This application also opens a log file (for eg a.log).

When this application is run from the inittab file as follows

/bin/sh -c " . /etc/timezone; exec /test"

all the cout & cerr statements are printed in the log file (a.log).

This is happening even though I have not explicity re-directed
the output to a.log file.

Please clarify.
  #2 (permalink)  
Old 09-19-2003
davidg's Avatar
davidg davidg is offline
Registered User
  
 

Join Date: Jul 2003
Location: Holland
Posts: 207
Hi Soorajmu,

What I can see from you example is that you perform an exec inside an sh. I do not know what the need is for that. What I do can tell you is that you exec does not fork to another process. So all behaviours (including vars) remain of the current shell.

If you post us some more code it might e easier to understand. It looks however it has to do with the exec.

Regs David
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:40 AM.


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