idealvin / gitalk

comments for Alvin's blog
0 stars 0 forks source link

Operating System | Documents for Coost #124

Open idealvin opened 1 year ago

idealvin commented 1 year ago

https://coostdocs.github.io/en/co/other/os/

include: co/os.h.

os #os::cpunum int cpunum(); Returns the number of system CPU cores. #os::cwd fastring cwd(); Returns path of the current working directory. On windows, \ in the results will be converted to /. #os::daemon void daemon(); Put the current process to run in the background, for linux only. #os::env 1. fastring env(const char name); 2. bool env(const char name, const char* value); 1, get value of the environment variable. 2, added in v2.