From: mortenp Date: Tue, 18 May 2004 17:02:20 +0000 (+1000) Subject: added comment about why the rename() call is safe X-Git-Tag: RELEASE_1_0_0~244 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ac85ca54ff25eb23718ca2033030d39c146b607;p=thirdparty%2Fmlmmj.git added comment about why the rename() call is safe --- diff --git a/src/mlmmj-send.c b/src/mlmmj-send.c index 6622ea63..01bfe5f4 100644 --- a/src/mlmmj-send.c +++ b/src/mlmmj-send.c @@ -433,6 +433,11 @@ int main(int argc, char **argv) } if(listctrl[0] != '1' && listctrl[0] != '2') { + /* It is safe to rename() the mail file at this point, because + the child processes (who might still be running) inhirit a + handle to the open file, so they don't care if it is moved + or deleted. */ + /* The mail now goes to the archive */ rename(mailfilename, archivefilename);