ChinaUnix.net
相关文章推荐:

daemon函数

原程序是一个TCP服务端, ACCEPT RECV SEND 后来在main函数中加上了daemon( 0, 0 )以后,程序无法接受任何外来连接. 请问这是怎么回事??? :em20: :em20: :em20: :em20:

by 我learnc - C/C++ - 2009-04-08 18:59:02 阅读(1927) 回复(4)

相关讨论

我的目的:使用c开发一个系统,通过daemon程序从/proc/net/dev读取并统计流量,通过socket连接在server上读取daemon提供的流量信息并显示,通过gd库绘制图形。 用daemon 可以写出一个监听端口程序。但是如何从/dev 文件中读取流量数据?

by 守住每一天 - C/C++ - 2007-11-21 13:43:23 阅读(1556) 回复(0)

Stevens网络编程里说避免调用printf和fprintf 我都去掉了,可是还是出现了问题 前台调试完全正确,一转道后台就出问题,自动退出了 (gdb) run Starting program: /root/xxx/xxx [New Thread 1073934976 (LWP 22627)] Program exited normally. 请问是否还有其他函数不应该在daemon程序中使用?

by yamir - C/C++ - 2005-11-23 12:55:21 阅读(1481) 回复(3)

介绍一下daemon

by hanlenry - 博客SNS站务交流区 - 2008-09-08 13:36:39 阅读(2853) 回复(0)

以下程序开始运行时,只有一个进程,到后来会同时出现数个进程,是怎么回事呢? [quote]& init_daemon; while(1) { & myapp(); sleep(5); } exit; sub init_daemon { my $pid; if( $pid=fork() ) { exit(0); } elsif( $pid< 0 ) { exit(1); } }[/quote]

by 屠龙 - Perl - 2009-01-02 11:14:12 阅读(1888) 回复(6)

The term “daemon” is derived from Greek mythology. The ancient Greeks called a supernatural being that acted as an intermediary between the gods and man a daemon.

by sunsun2003 - Solaris - 2003-05-26 09:19:50 阅读(946) 回复(2)

Feb 3 23:33:05 test adm: [ID 702911 daemon.error] Feb 3 23:33:05 test last message repeated 4 times Feb 3 23:33:05 test adm: [ID 702911 daemon.error] ********** SYSTEM ACCOUNTING STARTED Sun Feb 3 23:33:05 CST 2009 ********** 这个adm 进程到底是什么东西? 怎么报错信息这么少 谢谢!

by lcqxmu - Solaris - 2009-02-04 12:52:15 阅读(1246) 回复(0)

if (daemonmode == 1) { if (fork()) exit(0); /* Exit from parent process */ setsid(); if (fork()) return 0; } 一般 daemon 程序 fork 一次就可以了吧 第二个 fork 何解?

by fox000002 - C/C++ - 2008-12-01 11:50:58 阅读(2517) 回复(10)

"""Disk And Execution MONitor (daemon) Configurable daemon behaviors: 1.) The current working directory set to the "/" directory. 2.) The current file creation mode mask set to 0. 3.) Close all open files (1024). 4.) Redirect standard I/O streams to "/dev/null". A failed call to fork() now raises an exception. References: 1) Advanced Programming in the Unix Environment: W. Richa...

by Kevinkw - Python文档中心 - 2008-09-22 15:59:25 阅读(2121) 回复(0)

请问,/usr/adm/syslog.dated/current 目录下的daemon.log 日志是什么日志啊?谢谢,刚刚学习UNIX,不是很了解

by cjch123 - Solaris - 2008-03-31 11:32:03 阅读(1261) 回复(0)

不好意思,搜索了好多地方没找到答案,只好发贴求助了。 我的一个程序变成daemon之后,pthread创建的线程统统都没有在运行(线程往调试文件写调试信息也没受到) ps axm只看到一个线程。请问这是为什么呢?

by soulskylove - C/C++ - 2008-03-15 08:42:09 阅读(2211) 回复(3)