博文

目前显示的是 十二月, 2016的博文

daemon program using free pascal

{--------------------------------------------------------------------------- CncWare (c) Copyright 2000 --------------------------------------------------------------------------- Filename..: daemon.pp Programmer: Ken J. Wright Date......: 03/21/2000 Purpose - Program to demonstrate construction of a Linux daemon. Usage: 1) Compile this program. 2) Run it. You will be immediately returned to a command prompt. 3) Issue the command: ps ax|grep daemon. This will show you the process id of the program "daemon" that you just ran. 4) Issue the command: tail -f daemon.log. This let's you watch the log file being filled with the message in the code below. Press Ctrl/c to break out of the tail command. 5) Issue the command: kill -HUP pid. pid is the process number you saw with the ps command above. You will see that a new log file has been created. ...