EverKB

Knowledge Base Ever

लिनक्स पर डेमॉन प्रक्रिया कैसे लिखें

2019-11-18 11:13:25

टैग: Linux, daemon process, daemon,

लिनक्स पर, डेमन के पास डेमन नामक एक फ़ंक्शन के साथ एक मानक एपीआई है, जिसे निम्नानुसार घोषित किया गया है:
daemon(int nochdir, int noclose);
यहाँ एक सरल उदाहरण दिया गया है:
int main(int argc, char* argv[])
{
    daemon(0,0);
    while(1)
    {
        sleep(10)
        /*do something*/
    }

    return 0;
}

टैग

CentOS7 CentOS PHP Linux Python3 Python MySQL MariaDB YUM JavaScript MySQL8 caching_sha2_password HTML mysql_native_password PHP7 CSS Redis frequency conflict set_error_handler TestCase Compiling PHP Elasticsearch7.3 PHPUnit ss5.conf apr HTTP particles.js Slim Vincent Garreau daemon Failed to build these modules: _uuid MongoDB Sudo ip command pg_bha.conf SQL Server width DATE_ADD Frameworks MySQL-python scrollbar Tcp BBR Compiling Apache Elasticsearch libpython3.7m.so.1.0 PHPStorm ss5-3.8.9 Apache2.4 NodeJs show VIM CURLOPT_POSTFIELDS Failed to build these modules: _ctypes Minimal ISO substr Bluetooth INTERVAL PECL SQL Date Funcitons Wi-Fi date sub font-size root Tag Cloud CodeIgniter dual network interfaces Laravel ss5 apache httpd horiz-align node.js ShadowsocksR vertical-align CURLFille exec mb_substr PyCharm SUBDATE BarManager IntelliJIDEA PEAR SOCKS5 Proxy Server WebStorm date add find remi Tag Chrome du jQuery PHP5.5 src Apache hide nginx Shadowsocks-Python V2Ray cURL eth0 MariaDB10.4 PostgreSQL sub folder availability Install MongoDB pdo_sqlsrv SOCKS5 Web Server date File Upload mssql-tools register_shutdown_function Symfony JetBrain php-fpm sqlsrv Zend Framework ADDDATE DevExpress height network interface Shadowsocks-Libev unixODBC-devel error_get_last Port 80 string Aura INDENTIFIED BY password policy requirements SOCKS Web Development data Fedora Media Writer msodbcsql Redis5 SVN jemalloc SQLAlchemy absolute Deepin FuelPHP mysqlclient Shadowsocks toggle convert Error Control Operator margin PHPUnit Framework ss5.passwd at-symbol IIS password SOCKET vps daemon process Fatal Errors MongoDB4 sudoers center Phalcon SQL Server 2017 WiFi .htaccess DATE_SUB

नवीनतम लेख