タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

unixとposixに関するtakahirokiのブックマーク (2)

  • Super Technique 講座〜シグナルとコールバック

    この文書ではまず、関数ポインタとその型チェックについて述べた後で、UNIXのシグナル機能について解説する。そして、ウィンドウシステムのプログラミングで多用される「コールバック」について解説する。 ちなみにシグナルの機能は質的には UNIX に固有である。他のOSにもないわけではないが、その異同については筆者は関知しない。また、UNIXでのシグナルの実装については Linux を基準に解説をしていく。UNIX シグナルは、実は具体的な実装において大変差がある機能なのだが、一応 POSIX で「こう実装しなさい」という風に決まってはおり、後発の Linux は比較的マジメにそれを実装しているので、まあ、Linux を基準にするのが無難というものであろう(ユーザ比の問題を別にしても)。勿論、伝統的に重要ないわゆる「SysVシグナル」「BSDシグナル」についてもしっかりと解説しているが、もはや「

  • How does Linux handle multiple consecutive path separators (/home////username///file)?

    I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a double '/ in the path. I know that bash doesn't care if you have multiple file separators, but I'm wondering how exactly that is rectified. Is it bash that strips extra /s or does it really not matter eve

    How does Linux handle multiple consecutive path separators (/home////username///file)?
    takahiroki
    takahiroki 2016/02/23
    先頭の'//' (exactly 2) 以外は、複数個のスラッシュ (as path name) は、単一の slash と等価。
  • 1