[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



On Wed, 2004-05-12 at 07:32, Geoffrey wrote:
> Christopher Fowler wrote:
> > I've created a socket from a client usins:
> > $client = $server->accept();
> > 
> > I'm trying to redirect 0,1,2 with the following code:
> > 
> > *STDIN = $client;
> > *STDOUT = $client;
> > *STDERR = *STDOUT;
> > 
> > If I stay in the perl program all output goes to the socket.
> > The minute I do exec() the output goes to the TTY.  What is the correct
> > way to redirect those so they follow during an exec()?
> 
> As in C, might you need to do a fork() first?  Running through perldoc 
> -f exec() I don't see that it has the same functionality as 'man 3 
> exec()' as perl exec() uses the shell to parse it's args.
> 
> Just a lot of guessing here as I've not played with exec() in perl (yet).


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00448" href="msg00448.html">[ale] Redirecting STDOUT in perl to a socket</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00452" href="msg00452.html">[ale] Redirecting STDOUT in perl to a socket</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00454.html">[ale] 802.11g for linux?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00456.html">[ale] Nuking a drive</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00452.html">[ale] Redirecting STDOUT in perl to a socket</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00469.html">[ale] Redirecting STDOUT in perl to a socket</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00455"><strong>Date</strong></a></li>
<li><a href="threads.html#00455"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>