From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,d526bc0326438b3b,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-11-18 04:37:53 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!xlink.net!howland.reston.ans.net!pipex!uknet!comlab.ox.ac.uk!newshost!rpb From: rpb@psy.ox.ac.uk (Ray Bellis) Subject: Please help with modification to my autonice daemon Message-ID: Organization: O.U. Dept. of Experimental Psychology Date: 18 Nov 1993 09:06:43 GMT Some of you may be using my autonice daemon to automatically lower the priority of long running user processes. I've found that it's impossible to start the currently released version from within a /sbin/init.d/xxxx script. I've heard from someone in the US who has been told my DEC that there's an undocumented way of starting a daemon properly, but my attempts to duplicate this within my own source code have failed. As far as I can tell, what's needed is an unknown combination of calls to fork, setsid, open, close and dup2. My current version already does the fork and setsid, and that works fine what it's started from the command line, but it won't work from within a shell script :-( Any help would be much appreciated, especially if someone from within DEC can give me the source code to the daemon library function. If you can't give me the source code, just tell me what functions are called in what order and I'll turn it into C code myself... :-) Thanks, Ray. -- ------------------------------------------------------------------------------ R. P. Bellis E-Mail: Dept. of Experimental Psychology Whois: (RB83) University of Oxford Tel: +44 865 271419 South Parks Road Fax: +44 865 310447 Oxford OX1 3UD ------------------------------------------------------------------------------