Subject: Re: wrap up of pipe(2)
To: Darren Reed <darrenr@reed.wattle.id.au>
From: John Nemeth <jnemeth@victoria.tc.ca>
List: tech-userlevel
Date: 10/03/2001 08:28:10
On Jan 19, 12:17pm, Darren Reed wrote:
} 
} Comments on the the following change for pipe(2) ?

     Given that one can catch both SIGSEGV and SIGBUS thus averting a
core dump (I know, not done that often, but it is still possible)
shouldn't it simply say that you will get one of the signals?

} Index: pipe.2
} ===================================================================
} RCS file: /cvsroot/basesrc/lib/libc/sys/pipe.2,v
} retrieving revision 1.11
} diff -c -r1.11 pipe.2
} *** pipe.2	1999/12/02 21:42:38	1.11
} --- pipe.2	2001/10/03 14:08:37
} ***************
} *** 97,107 ****
}   Too many descriptors are active.
}   .It Bq Er ENFILE
}   The system file table is full.
} - .It Bq Er EFAULT
} - The
} - .Fa fildes
} - buffer is in an invalid area of the process's address
} - space.
}   .El
}   .Sh SEE ALSO
}   .Xr sh 1 ,
} --- 97,102 ----
} ***************
} *** 114,119 ****
} --- 109,127 ----
}   .Fn pipe
}   function conforms to
}   .St -p1003.1-90 .
} + .Sh BUGS
} + At present, EFAULT is not returned by
} + .Fn pipe ,
} + rather, the current implementation does not handle a bad address
} + gracefully.  A core dump as a result of either
} + .Dv SIGSEGV
} + or
} + .Dv SIGBUS
} + can be expected, instead, if a bad address is supplied as the
} + .Fa fildes
} + buffer.  A future implementation of
} + .Fn pipe ,
} + may return EFAULT instead of generating a core dump.
}   .Sh HISTORY
}   A
}   .Fn pipe
}-- End of excerpt from Darren Reed