Fixes for miscellaneous bugs in /proc patch

Chris January
Fri May 3 07:23:00 GMT 2002

This patch superceeds "Fix for incorrect handling of open flags in

Fixes the following bugs:
* '.' and '..' directory entries were missing.
* fhandler_*::open() were using the mode parameter as if it was the flags
parameter. This has been corrected and some minor changes made to the error
handling logic.
* Correctly indentifies the case when you try to create a new file in /proc
or one of its subdirectories.
* dup() was broken, hence cat </proc/uptime, etc. failed. This has now been
* fhandler_registry::telldir didn't return the correct position in the
* fhandler_registry::seekdir didn't work.


2002-05-03  Christopher January <>

 * (fhandler_proc::open): Change use of mode to flags.
 If the file does not exist already, fail with EROFS if O_CREAT flag is
 Use cmalloc to allocate memory for filebuf.
 * (fhandler_process::open): Ditto.
 * (fhandler_registry::open): Ditto.
 Move check for open for writing before open_key.
 * (path_conv::check): Do not return ENOENT if a file is not found
 in /proc.
 * (fhandler_virtual::write): Change EROFS error to
 EACCES error.
 * (fhandler_virtual::open): Set the NOHANDLE flag.
 * (fhandler_virtual::dup): Add call to
 Allocate child's filebuf using cmalloc.
 Copy filebuf from parent to child.
 * (fhandler_virtual::close): Use cfree to free filebuf.
 * Add '.' and '..' to directory listing.
 * Ditto.
 * Ditto.
 * (fhandler_registry::readdir): Add support for '.'
 and '..' files in subdirectories of /proc/registry.
 * (fhandler_registry::telldir): Use lower 16 bits
 of __d_position as position in directory.
 * (fhandler_registry::seekdir): Ditto.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog2
Type: application/octet-stream
Size: 1380 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proc.patch.3
Type: application/octet-stream
Size: 16082 bytes
Desc: not available
URL: <>

More information about the Cygwin-patches mailing list