Path: utzoo!attcan!uunet!cs.utexas.edu!texbell!texsun!rpp386!jfh From: jfh@rpp386.cactus.org (John F. Haugh II) Newsgroups: alt.sources Subject: Re: load average daemon for xenix redux Message-ID: <17362@rpp386.cactus.org> Date: 26 Nov 89 08:40:17 GMT References: <17357@rpp386.cactus.org> Reply-To: jfh@rpp386.cactus.org (John F. Haugh II) Distribution: alt Organization: Lone Star Cafe and BBS Service Lines: 32 In article <17357@rpp386.cactus.org> root@rpp386.cactus.org (John F. Haugh II) writes: >this little program has been kicked around alt.sources a few >times and i thought i'd take a whack at it. and after a day of using it i realized i should have waited until i'd used it longer before posting ... >main(argc, argv) > char **argv; >{ > int i, n, n_run, n_disk; > int mypid = getpid(); this initialization of mypid needs to be moved after the fork() > signal (SIGHUP, SIG_IGN); > if (fork ()) > exit (0); > > setpgrp (); right here, like this > mypid = getpid (); this gave me a semi-permanent load average of 1.0 with nothing running. -- John F. Haugh II +-Things you didn't want to know:------ VoiceNet: (512) 832-8832 Data: -8835 | The real meaning of IBM is ... InterNet: jfh@rpp386.cactus.org | ... I've Been to a Meeting. UUCPNet: {texbell|bigtex}!rpp386!jfh +--<><--<><--<><--<><--<><--<><--Yea!--