るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.023秒)
トップページ > クラス:BasicSocket[x] > クエリ:process[x] > クエリ:egid=[x]

別のキーワード

  1. process fork
  2. process abort
  3. process setrlimit
  4. tracer display_process_id=
  5. tracer display_process_id

ライブラリ

検索結果

BasicSocket#getpeereid -> [Integer, Integer] (13.0)

Unix ドメインソケットにおいて接続相手の euid と egid を 返します。

...です。

require 'socket'

Socket.unix_server_loop("/tmp/sock") {|s|
begin
euid, egid = s.getpeereid

# Check the connected client is myself or not.
next if euid != Process.uid

# do something about my resource.
ensure
s.close
end
}...