This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: chdir() is not per thread and JFFS2 unmount
- From: Thomas Koeller <thomas dot koeller at baslerweb dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Cc: Øyvind Harboe <oyvind dot harboe at zylin dot com>,ecos-discuss at sources dot redhat dot com
- Date: Thu, 1 Apr 2004 15:41:29 +0200
- Subject: Re: [ECOS] chdir() is not per thread and JFFS2 unmount
- Organization: Basler AG
- References: <1080825705.21957.4.camel@famine>
Øyvind Harboe wrote:
> While tracking down some other bugs I ran into a surprise with current
> directories:
>
> 1. chdir() does not appear to be tracked per thread.
>
> This seems a bit strange. errno is tracked per thread, so why not
> current directory?
>
> io/fileio/current/src/misc.cxx:cyg_dir cyg_cdir_dir = CYG_DIR_NULL;
>
> 2. Is chdir(CYG_DIR_NULL) supported?
>
> http://sources.redhat.com/ml/ecos-discuss/2004-03/msg00155.html
>
>
> Øyvind
I'd say errno is a per-thread variable by its very nature, different
threads making different calls expect to receive error information
for the calls they made.
This is different for the current directory - all threads share a
common set of file descriptors and stream handles, and so it makes
sense to also share a common current directory. Think of it as
_one_ multithreaded process.
tk
--
--------------------------------------------------
Thomas Koeller, Software Development
Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg
Germany
Tel +49 (4102) 463-390
Fax +49 (4102) 463-46390
mailto:thomas.koeller@baslerweb.com
http://www.baslerweb.com
==============================
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss