execvp and the rest...

From: Shane Lee (mudmaster@Randor.zzn.com)
Date: 09/13/00

Okies, first what I am doing:
I am using nanny() to allow a player to enter some information into a
file. The file then is closed and renamed. Then a perl script grabs
the file, emails it and then deletes it.
What I want to do:
As the file is closed, I want to call the perl script, otherwise if
the player doesn't enter the game and tries to enter more
information, the original file is overwritten.
The perl script is set to run every five minutes, but this wastes
resources and of course the player can overwrite their old info.
I have written a command that calls the script (using pgrun.c), but I
can't do a "do_swrite(d->character, 0, 0, 0);" while the player is in
nanny, this crashes the game.
I tried execvp("../scripts/email.pl", NULL);, but this crashes tha
game AND the script. I don't understand pipes or forks, so I prolley
shouldn't be messing with this sort of thing, but then this is
something I really do want to do.
If anyone can help me with this, I would be more than happy to
provide more info if needed.
 From the lib folder, the command would be:
(Linux server BTW)
cd ../scripts/email.pl


Get your Free E-mail at http://randor.zzn.com
Get your own Web-Based E-mail Service at http://www.zzn.com

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |

This archive was generated by hypermail 2b30 : 04/11/01 PDT