From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078611110561.tru64-unix-managers.marc@archive.invalid> From: "Randy Rodgers" Date: Mon, 21 Apr 1997 18:15:39 +0000 To: tru64-unix-managers Subject: Summary: LSM volwatch X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078611110561 Managers, My original question was: > I am considering having the script run "nohup volwatch root". Can anyone > tell me if this will work? This will work. The only drawback being that it creates a "nohup.out" file. I got a solution to this from Martyn Johnson maj@cl.cam.ac.uk which I have included below: ============================================================================ ===== I'm not sure whether nohup will work. It should, but it has the annoying side effect of making a "hohup.out" file. I had the same problem and used a locally-written program "setsid" which simply arranges to run a program as a session leader. Here is my volwatch script: -------------------------cut--------------------------- PATH=/sbin:/usr/sbin:/usr/bin export PATH case "$1" in 'start') if [ -x /usr/sbin/volwatch -a \ -x /usr/sbin/volnotify -a \ -f /etc/vol/volboot ]; then setsid volwatch maintain & echo $! > /var/run/volwatch.pid fi ;; 'stop') if [ -s /var/run/volwatch.pid ]; then kill -TERM -`cat /var/run/volwatch.pid` rm /var/run/volwatch.pid fi ;; *) echo "usage: $0 {start|stop}" ;; esac -------------------------cut--------------------------- and the "setsid" program that it uses is merely: -------------------------cut--------------------------- #include main(argc, argv, envp) char ** argv, ** envp; { (void) setsid(); execvp(argv[1], &argv[1], envp); } -------------------------cut--------------------------- Hope this helps. -- Martyn Johnson maj@cl.cam.ac.uk University of Cambridge Computer Lab Cambridge UK [================================= [ Randy Rodgers [ rrodgers@fwi.com [ System Administrator [ Allen County/City of Fort Wayne [ Information Systems (SCT) [ (219)449-7660 [=================================