CVSROOT: /cvs Module name: src Changes by: m...@cvs.openbsd.org 2018/05/28 02:55:11
Modified files: sys/kern : kern_descrip.c lib/libc/sys : dup.2 Log message: Returns EBUSY if dup2(2) is called for a LARVAL file. This prevents a panic due to a double free if a program exits after having called accept(2) and dup2(2) on the same fd but without the corresponding connect(5). It will also allows us to simplify file descriptor locking. The error code has been choosed to match Linux's behavior. Pointed by Mathieu on tech@ after a discussion with guenther@. ok visa@