[Gauche-devel-jp] Re: directory 作成時の mode

Back to archive index

Osamu NAKAMURA naka****@hasak*****
2004年 9月 2日 (木) 09:38:56 JST


At Wed, 01 Sep 2004 21:32:45 +0900,
自分 wrote:
> スレッドのことは(も)よく知らないのですけれど、各スレッドの
> umask の状態は、共通なのでしょうか。スレッドによって、umask を
> 変えたいということもありそうな気がしますけれども。

http://www-106.ibm.com/developerworks/linux/library/l-rt7/
を見てましたら、(日本語版は訳が一部不明瞭だったので。)

Threads

...

The most obvious distinction between processes and threads is that all
threads of a process share the same memory space and system-defined
"facilities." Facilities include open file handles (file descriptors),
shared memory, process synchronization primitives, and current
directory. Because global memory is shared and almost no new memory
must be allocated, creating a thread is simpler and faster than
creating a process.

うーん、file handles や current directory を共有するってある。
thread programing においては、umask や current directory の
変更は要注意ってことですか。

thread 毎にこれらの属性を管理する標準的な仕組みがない
(そういうことしたかったら、child process を使え)
と理解してたらいいんでしょうか。

(thread programing なぞという、シビアなプログラム開発は予定ない
 ですけれど。^^;;)

# オフトピ失礼。
--



Gauche-devel-jp メーリングリストの案内
Back to archive index