Understanding pipes and blocking calls

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

 



Hi,

I am working on a simple command line application for Linux, in order
to properly understand how pipes and blocking calls interact. The
application writes some data to stdout, before sleeping and then
writing some more. I have set stdout to be unbuffered, and do an
fflush before the sleep to be absolutely sure that there is no
buffered data left. When I try to pipe this data to another
application, the receiving application does not progress before the
sleep is over. Based on my understanding of pipes, the two
applications are independent and, thus, the receiving application
should not be affected by any sleeps in the producer of data. Is this
incorrect, and is there a way to fix this (i.e., having blocking calls
in the producer)?

Thanks in advance,
Kristian

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux