pipes

scw%ucla-locus at cepu.UUCP scw%ucla-locus at cepu.UUCP
Tue Dec 13 05:57:00 AEST 1983


From:  Steve Woods <cepu!scw at ucla-locus>

This question is more in the relm of info-unix

	Concerning ANY REAL, i.e. bsd or bell, unix systems.

	I have several processes all writing to the same pipe at once.  If in
	those processes I say:
		write(p[1], buf, 100);
	can I depend on all 100 bytes being together, even if somebody else
	decides to write at or about the same time?

According to pipe(2) 'Writes with a count of 4096 or less bytes are atomic;
no other process can intersperse data'. The answer is yes, your write of 100
bytes will all be in one packet.



More information about the Comp.unix.wizards mailing list