> As an important (if I do say so myself) addendum, system() is
> blocking. Basically, the calling process (e.g., the MUD in this case)
> will be stopped until the system() call returns (which is, in general,
> when the called command ends).
system blocks SIGCHLD, yes this can be harmful. =)
try looking at popen, and if at all possible, ALWAYS calls a mail program
after filtering any possible arguments, especially for semi-colon's.
Remember, system and popen call /bin/sh to execute the blurb you specify,
and the shell will interpret ";".
I believe popen does a normal fork and assigned pipe to the procress,
creating a stream.
It's better to call sendmail (if you have it):
/usr/lib/sendmail -t
headers and body of message
EOF
This prevents abuse from user supplied "email addresses"
d.
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST