random_r é¢æ°ã¯ glibc ãæä¾ãã¦ãããªã¨ã³ãã©ã³ããªæ¬ä¼¼ä¹±æ°çæAPIã§ãã è¤æ°ã®ã¹ã¬ããã§ä¹±æ°ã使ãããå ´åã¯ããã使ãã¹ããããã*1 è¤æ°ã®ã¹ã¬ããã random() ã使ããããªç¶æ³ã§ã¯ããã®é¢æ°ã使ç¨ãã¹ãã§ã¯ãªãã ãã®å ´åã«ã¯ random_r(3) ã使ããã¨ã http://linuxjm.sourceforge.jp/html/LDP_man-pages/man3/random.3.html ãã å°ãªãã¨ããã®ããã¥ã¢ã«ãä¸ååã§ãman ãèªãã ã ãã ã¨æ£ãã使ããã¨ã¯åºæ¥ã¾ããã 以ä¸ã«ç§ã®æå 㧠åããããã«è¦ãã ã³ã¼ãã示ãã¾ãã /* * $ gcc -o test test.c && ./test */ #include <stdio.h> #include <stdlib.h> int main (int argc, char * a
{{#tags}}- {{label}}
{{/tags}}