[PATCH] _unlink() & rmdir() on /proc/*

Christopher Faylor cgf@redhat.com
Tue Jun 4 08:35:00 GMT 2002

On Tue, Jun 04, 2002 at 02:37:20PM +0200, Pavel Tsekov wrote:
>Currently "rm -rf" on a file or directory under /proc returns
>ENOENT. This is not correct and is caused by the fact that
>the posix filename for, say, /proc/uptime is translated to
>the following win32 name: c:\cygwin\proc\uptime (if c:\cygwin
>is mounted on /).
>The attached patches fix this problem by returning EROFS
>from _unlink() and rmdir() if path_conv::get_devn() returns
>any of the following device numbers: FH_PROC, FH_PROCESS, FH_REGISTRY.
>P.S. I don't expect this patches to be applied because they may look
>like ugly hacks or something like that... I didn't find any more
>appropriate way to fix this though without greater modifications to
>the code. I see several ways of fixing this in a much better way:

I haven't actually read your patch since, AFAIK, you don't have an
assignment with Red Hat, right?  If this is the case, would you mind
sending one in?

If you do have an assignment, please let me know (here in
cygwin-patches) and I'll take a look at this further.


More information about the Cygwin-patches mailing list