Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!waikato.ac.nz!comp.vuw.ac.nz!cc-server4.massey.ac.nz!A.Raman From: A.Raman@massey.ac.nz (A.V.Raman) Newsgroups: comp.unix.questions Subject: How do I unset TXTBSY on a daemon's binary? Message-ID: <1991May10.042300.5901@massey.ac.nz> Date: 10 May 91 04:23:00 GMT Organization: Massey University Computer Centre Lines: 24 Hi all, I've got two questions regarding a daemon I'm writing. 1. What is the accepted procedure to unset the TXTBSY flag on the binary after the daemon backgrounds itself? 2. How do I find out if a particular user is logged on from within a C program. I need to do (1) because I want to be able to make changes to the code and compile and reinstall it, but the changes are not so important that the currently running daemon needs to be killed and restarted. Currently when I try to install a new version when the old daemon is running, I get the error message: Text file busy. I need to do (2) because I want to find out whether I must write a user or mail him regarding some status change he required. I tried doing a man -k on "user", "wtmp", "logg" etc., but none gives me any info about a C library function / System call that tells me whether a particular user is logged on. Thanks in advance. - &