centreborelli / on-line-vpp

On-line version of the off-line-vpp
GNU General Public License v3.0
3 stars 0 forks source link

dup vs tee #2

Open mnhrdt opened 6 years ago

mnhrdt commented 6 years ago

https://github.com/cmla/on-line-vpp/blob/4ef61db2c7a5dbe19db3a9c8f89b14a6cddcf731/src/vpp/src/vp.c#L685

the name "dup" may be confusing, shouldn't it rather be "tee" ?

kidanger commented 6 years ago

It is named dup because it is clear that it duplicates a stream, and also not to confuse it with "tee". "tee" does not offer the same features and should not be used with vpp.

mnhrdt commented 6 years ago

I do not mean to use the program "tee", my concern is with the choice of the name "dup" for this function (creating a new stream with the same contents). This has always been called "tee", whereas dup(2) is used to give a new name to the same stream (without creating a new stream).