setsid

å称
     setsid — ã»ãã·ã§ã³ãä½æãããã»ã¹ã°ã«ã¼ã ID ãè¨å®ãã

ã©ã¤ãã©ãª
     Standard C Library (libc, -lc)

æ¸å¼
     <unistd.h> pid_t setsid(void)

解説
     setsid() ã·ã¹ãã ã³ã¼ã«ã¯æ°ããã»ãã·ã§ã³ãä½æãã¾ãã
     å¼ã³åºãã»ãã·ã§ã³ã¯æ°ããã»ãã·ã§ã³ã®ã»ãã·ã§ã³ãªã¼ãã§ããã æ°ãããã‐
     ã»ã¹ã°ã«ã¼ãã®ããã»ã¹ã°ã«ã¼ããªã¼ãã§ãå¶å¾¡ç«¯æ«ã¯ããã¾ããã å¼ã³åºããã‐
     ã»ã¹ã¯ãã»ãã·ã§ã³ã¾ã㯠ããã»ã¹ã°ã«ã¼ãã®ã©ã¡ããã«ããå¯ä¸ã®ããã»ã¹ã§ãã

æ»ãå¤
     æ£å¸¸ã«å®äºããã¨ã setsid() ã·ã¹ãã ã³ã¼ã«ã¯ãæ°ããããã»ã¹ã°ã«ã¼ãã®ãã‐
     ã»ã¹ã°ã«ã¼ã ID ã®å¤ãè¿ãã¾ãã ããã¯å¼ã³åºãããã»ã¹ã®ããã»ã¹ ID ã¨åãã§ãã
     ã¨ã©ã¼ãèµ·ããã¨ã setsid() 㯠-1 ãè¿ããã¨ã©ã¼ã示ãããã«ã°ãã¼ãã«å¤æ° errno
     ãè¨å®ãã¾ãã

ã¨ã©ã¼
     setsid() ã·ã¹ãã ã³ã¼ã«ã¯æ¬¡ã®å ´åã«å¦çã失æãã¾ã:

     [EPERM]            å¼ã³åºãããã»ã¹ãæ¢ã«ããã»ã¹ã°ã«ã¼ããªã¼ãã§ãããã
                        ã¾ãã¯å¼ã³åºãããã»ã¹ä»¥å¤ã®ããã»ã¹ã®ããã»ã¹ã°ã«ã¼ã ID ã
                        å¼ã³åºãããã»ã¹ã®ããã»ã¹ ID ã¨ä¸è´ãã¾ãã

é¢é£é ç®
     setpgid(2), tcgetpgrp(3), tcsetpgrp(3)

è¦æ ¼
     setsid() ã·ã¹ãã ã³ã¼ã«ã¯ ISO/IEC 9945-1:1990 (“POSIX.1”)
     ä»æ§ã«é©åãã¦ãã¾ãã