[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] nmh should be more careful about when it unlinks draft
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files |
Date: |
Tue, 03 Jan 2017 09:18:58 -0500 |
>I didn't look at the code. :-) I just thought that surely 42 is
>open(2)'d with O_CREAT|O_EXCL so Unix annoints the race's winner.
Geez Ralph, how long have you been working with MH/nmh?? And don't
call me Shirley.
The long answer is:
- Programs will call m_draft() to get the name of the draft file. There
is locking there, but only to get the "new" sequence. It's easy for two
programs to get the same filename for "new".
- There is a check to see if the draft file exists, but there's no locking
there so it's easy to see how two programs could decide the same file
doesn't exist.
- The file is created with creat(), which as you know does get called with
O_CREAT, but does not include O_EXCL.
Really, the safest thing to do for Laura's case is to use the MH environment
variable to point to a new .mh_profile that has it's own Path that doesn't
stomp all over your personal mail directory.
--Ken
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, (continued)
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ralph Corderoy, 2017/01/02
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Laura Creighton, 2017/01/02
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, David Levine, 2017/01/02
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Laura Creighton, 2017/01/02
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ken Hornstein, 2017/01/02
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Laura Creighton, 2017/01/02
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ken Hornstein, 2017/01/02
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ralph Corderoy, 2017/01/03
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ken Hornstein, 2017/01/03
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ralph Corderoy, 2017/01/03
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files,
Ken Hornstein <=
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ralph Corderoy, 2017/01/03
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ken Hornstein, 2017/01/03
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Paul Vixie, 2017/01/03
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ken Hornstein, 2017/01/04
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Paul Vixie, 2017/01/04
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ken Hornstein, 2017/01/04
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Ralph Corderoy, 2017/01/04
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Laura Creighton, 2017/01/03
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Robert Elz, 2017/01/02
- Re: [Nmh-workers] nmh should be more careful about when it unlinks draft files, Laura Creighton, 2017/01/02