Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


why use dup? (not dup2)

Josh CodeJosh Code Member Posts: 675
Why would anyone use the unix/linux dup function?

I know that dup2 is useful but I'm confused about why someone use a function that seems to just return another number for the same job.

Why do we care if the file descriptor is the smallest available? We will store the value in a variable anyway. It seems like it might aswell be any int value.
Sign In or Register to comment.