This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: chdir() is not per thread and JFFS2 unmount


Ø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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]