/*++ /* NAME /* fifo_rdwr_bug 1 /* SUMMARY /* fifo server test program /* SYNOPSIS /* fifo_rdwr_bug /* DESCRIPTION /* fifo_rdwr_bug creates a FIFO and opens it read-write mode. /* On BSD/OS 3.1 select() will report that the FIFO is readable /* even before any data is written to it. Doing an actual read /* causes the read to block; a non-blocking read fails. /* DIAGNOSTICS /* Problems are reported to the standard error stream. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA
/*--*/
switch (select(fd + 1, &read_fds, (fd_set *) 0, &except_fds, &tv)) { case -1:
perrorexit("select"); default: if (FD_ISSET(fd, &read_fds)) {
printf("Opening a fifo read-write makes it readable!!\n"); break;
} case0:
printf("The fifo is not readable, as it should be.\n"); break;
}
cleanup(); exit(0);
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.