Unix Programming - Re: Need help with piping

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > November 2004 > Re: Need help with piping





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Need help with piping
William Ahern

2004-11-19, 5:51 pm

Fletcher Glenn <fletcher@removethisfoglight.com> wrote:
> Before you can use a file descriptor as a dup2 target, you must close it
> if it is open. In the case of zero and one, these descriptors are open.


From dup(2) on Linux:

dup2 makes newfd be the copy of oldfd, closing newfd first if
necessary.

From dup(2) on OpenBSD

In dup2(), the value of the new descriptor newd is specified. If
this descriptor is already in use, it is first deallocated as if a
close(2) call had been done first.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com