Unix-system-calls-getsid
[top]#
|http://www.google.com/[Google] | a|
Web | This Site |
選択した読書 Copyright©2014 by finddevguides |
[cols=",,,,,,,",] |
| | Home | | References | | Discussion Forums | | About TP
[width="100%",cols="100%",] |
a| == getsid()-Unix、Linuxシステムコール
[[File:]] image :http://www.finddevguides.com/images/next.gif [next] image:http://www.finddevguides.com/add- this.gif [AddThisソーシャルブックマークボタン]
広告
NAME
getsid-セッションIDを取得
概要
- #include <unistd.h> *
説明
_getsid(0)_は、呼び出し元プロセスのセッションIDを返します。 _getsid(p)_は、プロセスID _p_のプロセスのセッションIDを返します。 (プロセスのセッションIDは、セッションリーダーのプロセスグループIDです。)エラーの場合、(pid_t)-1が返され、_errno_が適切に設定されます。
エラー
Tag | Description |
---|---|
EPERM | A process with process ID p exists, but it is not in the same session as the current process, and the implementation considers this an error. |
ESRCH | No process with process ID p was found. |
準拠
SVr4、POSIX.1-2001。
ノート
LinuxはEPERMを返しません。
Linux 1.3.44以降、Linuxにはこのシステムコールがあります。 libc 5.2.19以降、libcがサポートされています。
glibcでプロトタイプを取得するには、XOPEN_SOURCEと_XOPEN_SOURCE_EXTENDEDの両方を定義するか、500以上の整数_n_に「#define _XOPEN_SOURCE _n」を使用します。
関連項目
[[File:]] image :http://www.finddevguides.com/images/next.gif [next] [[File:]]
広告
|
[cols="^",] |
|Advertisements