[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

is this an errata?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 10
Thread images: 1

File: 3982472.png (624KB, 1075x1000px) Image search: [Google]
3982472.png
624KB, 1075x1000px
LPG 6.2.2 Creating Pipes in C:
http://tldp.org/LDP/lpg/node10.html#SECTION00721000000000000000

is not this line incorrect?
>If the process sends data through the pipe (fd0), it has the ability to obtain (read) that information from fd1.

Should not be the other way around?
Isn't fd[0] supposed to be used for reading and fd[1] for writing?

pic unrelated
>>
>>59085011

Nobody here understands what you're talking about nerd. This board is for pretending to use certain OSes and gossiping about consumer hardware.
>>
>>59085542
This

>>>/reddit/
>>
>>59085542
>>59085552

Thanks for the bump I guess, but I expected a proper
answer in exchange for the anime tiddies.
>>
>>59085727

I'm not even joking, nobody here knows shit other than memes and brands. You must be new here.
>>
>>59085750
> You must be new here.
No, Im not, but I was stupid enough to think that the average /g/entoo man would bother to help me instead of shitposting.

I'm sure that after calling pipe() fd[0] is for reading input and fd[1] is for writing output but since I'm an insecure faggot I doubted if that was an errata or I was misinterpreting things.
>>
>>59086013

>shitposting

Nobody here is shitposting. It's just that nobody can help you because nobody knows. You sure are new.
>>
>>59085011
seems to be wrong
the following program produces 0->1: ���, 1->0: hello on my machine

#include <stdio.h>
#include <stdlib.h>
int main()
{
int pipefd[2];
int pfd2[2];
pipe(pipefd);
pipe(pfd2);
write(pfd2[1],"hello",6);
write(pipefd[0],"hello",6);
char b[10];
char b2[10];
read(pipefd[1],b,6);
read(pfd2[0],b2,6);
printf("0->1: %s, 1->0: %s\n",b,b2);
}
>>
>>59085011
Uncertain op. Found the following if I can try to contribute anything: http://stackoverflow.com/questions/29921246/why-fd1-is-write-and-fd0-is-read
>>
>>59087076
>>59087021

Thanks anons
Thread posts: 10
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.