Don't open pipes readwrite as it leads to confusion.
This commit is contained in:
parent
52cd12195e
commit
2d5058685d
1 changed files with 6 additions and 0 deletions
|
@ -287,6 +287,12 @@ PRIVATE int pipe_open(register struct inode *rip, register mode_t bits,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rip->i_pipe = I_PIPE;
|
rip->i_pipe = I_PIPE;
|
||||||
|
|
||||||
|
if((bits & (R_BIT|W_BIT)) == (R_BIT|W_BIT)) {
|
||||||
|
printf("pipe opened RW.\n");
|
||||||
|
return ENXIO;
|
||||||
|
}
|
||||||
|
|
||||||
if (find_filp(rip, bits & W_BIT ? R_BIT : W_BIT) == NIL_FILP) {
|
if (find_filp(rip, bits & W_BIT ? R_BIT : W_BIT) == NIL_FILP) {
|
||||||
if (oflags & O_NONBLOCK) {
|
if (oflags & O_NONBLOCK) {
|
||||||
if (bits & W_BIT) return(ENXIO);
|
if (bits & W_BIT) return(ENXIO);
|
||||||
|
|
Loading…
Reference in a new issue