Executed programs appending to syslog.

From: Shane P. Lee (tacodog21@yahoo.com)
Date: 03/09/01


I have a small function that is called whenever the first player after
a reboot/fold logs in that runs a program with system().
Example (Not actual code):
#define PRGM "Program"
#define FLAG "-v"
#define COMS "myfile"

void run_prgm(void)
{
 sprintf(buf, "%s %s %s nohup&", PRGM, FLAG, COMS);
 system(buf);
return;
}

Now, all I have to do is run a few basic checks and then do a
run_prgm();
The Good News: "&" works. It allows the program to run as a background
process.
The Bad News: "nohup" doesn't work. Everything is appended to the MUD
syslog.

I was thinking of doing something like "%s %s >> logfile&" but I'm
not entirely sure that will work, besides I don't even WANT a log of
what this program is doing.
Everthing appended to syslog from this program begins with "^M" which
leads me to believe that I could possibly catch it all before it gets
recorded, but I'm not sure how to do that.

All comments, flames, suggestions and Bad News gladly accepted,
-FIRE


=====
Don't relax!  It's only your tension that's holding you
together.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/04/01 PST