éå3: ãã«ãã¹ã¬ããã®ããã°ã©ã ã§ã®forkã¯ãããã ãã«ãã¹ã¬ããã®ããã°ã©ã ã§ããèªã¹ã¬ãã以å¤ã®ã¹ã¬ãããåå¨ãã¦ããç¶æ ãã§fork*1ãè¡ãã¨ããã¾ãã¾ãªåé¡ãå¼ãèµ·ããå¯è½æ§ãããã¾ãããåé¡ãã®å ¸åä¾ã¨ãã¦ã¯ãåããã»ã¹ã®ãããããã¯ãæãããã¾ããåé¡ã®è©³ç´°ãææ¡ããªãã¾ã¾ããã«ãã¹ã¬ããã®ããã°ã©ã ã§ä¸ç¨æã«forkããã®ã¯ããã¾ãããï¼ ä½ãèµ·ããã å®ä¾ããè¦ã¦ã¿ã¾ãããã次ã®ã³ã¼ããå®è¡ããã¨ãåããã»ã¹ã¯å®è¡éå§ç´å¾ã®doit() å¼ã³åºãæãé«ã確çã§ãããããã¯ãã¾ãã void* doit(void*) { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); struct timespec ts = {10, 0}; nanoslee
{{#tags}}- {{label}}
{{/tags}}