Date: Tue, 7 Nov 2000 18:39:16 +0600 (NS) From: Max Khon <fjoe@iclub.nsu.ru> To: hackers@freebsd.org Subject: daemon() Message-ID: <Pine.BSF.4.21.0011071837210.27603-100000@iclub.nsu.ru>
next in thread | raw e-mail | index | archive | help
hi, there! --- cut here --- #include <stdio.h> #include <stdlib.h> main() { if (daemon(1, 1) < 0) { perror("daemon"); } for (;;) sleep(1); } --- cut here --- lark:~$ps ax | grep foo3 26102 ?? Ss 0:00.00 ./foo3 26104 p8 S+ 0:00.01 grep foo3 lark:~$fstat -p 26102 USER CMD PID FD MOUNT INUM MODE SZ|DV R/W fjoe foo3 26102 root / 2 drwxr-xr-x 512 r fjoe foo3 26102 wd /usr 16007 drwxr-xr-x 8192 r fjoe foo3 26102 text /usr 16071 -rwxrwxr-x 4574 r fjoe foo3 26102 0 / 5542 crw--w---- ttyp8 rw fjoe foo3 26102 1 / 5542 crw--w---- ttyp8 rw fjoe foo3 26102 2 / 5542 crw--w---- ttyp8 rw fjoe foo3 26102 4* pipe c9f1cde0 <-> 0 0 rw lark:~$ what is FD 4? /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0011071837210.27603-100000>